Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 8 of 8

Thread: NEED HELP

  1. #1
    Junior Member
    Join Date
    Oct 2012
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default NEED HELP

    Can anyone help me in doing a program ? A program of a converter using control structures and arrays ( measurements-meters to kilometers , liters to mililiters etc. ) and a Text Twist game . Help me please! Thankkk you very much ! im beginner thats why i dont know !

  2. #2
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    Posts
    1,130
    My Mood
    Cynical
    Thanks
    64
    Thanked 140 Times in 135 Posts

    Default Re: NEED HELP

    Sure we'll try to help you, but of course no one here will do it for you. Where are you stuck exactly?

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: NEED HELP

    Please post the code you are having problems with and ask some questions about the problems.
    Work on one program at a time.
    If you don't understand my answer, don't ignore it, ask a question.

  4. #4
    Junior Member
    Join Date
    Oct 2012
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: NEED HELP

    HELLO. THIS IS MY PROGRAM. THERE IS NO ERROR BUT CAN ANYONE IMPROVE IT ? HAHA ! into JFRAME because i dont know how to code it in jframe ? its still not finish .

    import java.util.Scanner;

    public class UnitConverter {


    public static void main(String[] args)
    {
    double initialAmount;
    double convertedAmount;

    System.out.println("Welcome to Brian's Unit Converter");
    System.out.println();
    System.out.println("Which unit would you like to convert from:");
    System.out.println("centimeter feet inch kilometer meter mile millimeter yard?");
    Scanner kboard = new Scanner(System.in);
    String fromUnit = kboard.nextLine();
    System.out.println();
    System.out.println("Which unit would you like to convert to?");
    System.out.println("centimeter feet inch kilometer meter mile millimeter yard?");
    String toUnit = kboard.nextLine();
    System.out.println();

    System.out.println("You are converting from " + fromUnit + " to " + toUnit + "?");
    System.out.println("How many " + fromUnit + " would you like to convert to " + toUnit + "?");
    initialAmount = kboard.nextDouble();


    if(fromUnit.equals("centimeter") && toUnit.equals("feet"))
    {
    convertedAmount = initialAmount * 0.033;


    System.out.println(convertedAmount);

    }
    }
    }

  5. #5
    Junior Member
    Join Date
    Oct 2012
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: NEED HELP

    HUYYYY help me please !

  6. #6
    Member
    Join Date
    Sep 2012
    Location
    The Netherlands
    Posts
    84
    My Mood
    Inspired
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default Re: NEED HELP

    Dude relax.
    Also use code tags, then your code is better readable for others.
    Bigger chance others might see the error more easy.

    [*code]
    code goes here
    [*/code]
    Remove the *

  7. #7
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    Posts
    1,130
    My Mood
    Cynical
    Thanks
    64
    Thanked 140 Times in 135 Posts

    Default Re: NEED HELP

    You need to learn the rudiments of Swing programming to begin to understand what needs to be done. For this I strongly recommend that you check out the Swing tutorials. Best of luck.

  8. #8
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: NEED HELP

    how to code it in jframe
    There is a lot you need to learn to write a GUI application. Start with the tutorial: Trail: Creating a GUI With JFC/Swing (The Java™ Tutorials)
    If you don't understand my answer, don't ignore it, ask a question.