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 3 of 3

Thread: Beginner Question Here (Trying to make things easier)

  1. #1
    Member
    Join Date
    Jun 2011
    Posts
    94
    My Mood
    Amazed
    Thanks
    22
    Thanked 1 Time in 1 Post

    Default Beginner Question Here (Trying to make things easier)

    First of all, I only coded "Hello world" and "3+4=7" applications in Java.

    Here is the question:

    I am trying to build a program which shows the data types' max and min values for referance. Actually I built it, but without any GUI. Everytime I need to look up to the values, I have to type;
    java -jar "C:\Users\Mesut\Documents\NetBeansProjects\Deneme\ dist\Deneme.jar
    to reach the values. And I am already bored

    Although I don't know anything about GUI programming with Java, I tried to put the codes below into a GUI, but of course, I could not. This is discouraging me from Java, and I have to do something for that.

    So my problem is, how to implement these codes into the GUI so that the program only shows the results of the codes and an Exit button or menu

    public class Prg {
     
        public static void main(String[] args) {
            System.out.println("Integer veri tipi");
            System.out.println("Max :"+Integer.MAX_VALUE);
            System.out.println("Min  "+Integer.MIN_VALUE);
            System.out.println("---");
     
            System.out.println("Double veri tipi");
            System.out.println("Max :"+Double.MAX_VALUE);
            System.out.println("Min  "+Double.MIN_VALUE);
            System.out.println("---");
     
            System.out.println("Float veri tipi");
            System.out.println("Max :"+Float.MAX_VALUE);
            System.out.println("Min  "+Float.MIN_VALUE);
            System.out.println("---");
     
            System.out.println("Long veri tipi");
            System.out.println("Max :"+Long.MAX_VALUE);
            System.out.println("Min  "+Long.MIN_VALUE);
            System.out.println("---");
     
            System.out.println("Short veri tipi");
            System.out.println("Max :"+Short.MAX_VALUE);
            System.out.println("Min  "+Short.MIN_VALUE);
            System.out.println("---");
     
            System.out.println("Byte veri tipi");
            System.out.println("Max :"+Byte.MAX_VALUE);
            System.out.println("Min  "+Byte.MIN_VALUE);
            System.out.println("---");
     
     
     
        }
     
    }

    I know it is so noob that you won't feel like helping, but maybe a little guidance?

    Thanks.


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Beginner Question Here (Trying to make things easier)

    What IDE do you use? Have you looked at Netbeans? - NetBeans IDE - Swing GUI Builder

    You can drag and drop Swing components. This will be good for you because you can see results fast, but I suggest learning the basics of GUIs as being able to code it without a GUI Builder is always a skill to have.
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  3. #3
    Member
    Join Date
    Jun 2011
    Posts
    94
    My Mood
    Amazed
    Thanks
    22
    Thanked 1 Time in 1 Post

    Default Re: Beginner Question Here (Trying to make things easier)

    Actually, I am using it. But like I said, I could not put these codes into it. Why? Because I don't know how to do that, never learned.

    I just want the results of the codes in the first post to be GUI. I just don't know how to do that.

    I read many tutorials, but they do not mention what I want.

    To sum up, I am very new to Java, but I think I should have this application in GUI

Similar Threads

  1. How much easier is Java compared to C++
    By Psychotron in forum Java Theory & Questions
    Replies: 6
    Last Post: May 24th, 2011, 12:15 PM
  2. Beginner Question
    By jrt224 in forum Loops & Control Statements
    Replies: 1
    Last Post: March 10th, 2011, 12:56 PM
  3. [SOLVED] Simple question from a beginner
    By jimmylee7706 in forum Java Theory & Questions
    Replies: 1
    Last Post: March 6th, 2011, 09:57 PM
  4. Quick, beginner-level Java question.
    By DHG in forum What's Wrong With My Code?
    Replies: 1
    Last Post: January 27th, 2011, 01:06 PM
  5. Best beginners project in Java
    By Fendaril in forum Java Theory & Questions
    Replies: 3
    Last Post: February 10th, 2009, 08:52 AM