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

Thread: I'd like to do this but am totally new to working with a GUI

  1. #1
    Junior Member
    Join Date
    Jun 2017
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default I'd like to do this but am totally new to working with a GUI

    I don't like the way Java IDE's handle input and output. It shows at the bottom in an output window which is fine for programs that only work with output. But when you write code to do input, you will see the cursor placed at the wrong spot in the window which looks quite bad.

    So someone suggested to me awhile back that what I could do is make a window (GUI) that would be used to show the output of my program. I would also use this window to handle user input in case I wrote a program for that.

    I'm thinking along the simple lines of a window that would have two text boxes in it.

    The top text box would be used for user input (like if I asked the user to enter an integer he would enter it there).

    The bottom box would be used to show the results of the final program.

    Or maybe I could design two windows. One to be used if the program only works with output, and the other window to be used if input and output are used.

    But I have no experience in making a GUI.

    I was thinking maybe I could go on YouTube and get the basic code to draw a window, and figure out how to add a text box. Then I imagine I would need to place all this code in a method which would also be used in every program I write. I would be using over and over.

    So am I on the right track here and can you start me out?

  2. #2
    Member John Joe's Avatar
    Join Date
    Jun 2017
    Posts
    277
    My Mood
    Amused
    Thanks
    8
    Thanked 19 Times in 19 Posts

    Default Re: I'd like to do this but am totally new to working with a GUI

    There are no text box in JAVA GUI. It is called JTextField.
    Whatever you are, be a good one

  3. #3
    Junior Member
    Join Date
    Jun 2017
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: I'd like to do this but am totally new to working with a GUI

    Quote Originally Posted by John Joe View Post
    There are no text box in JAVA GUI. It is called JTextField.
    Who cares what they're called? It's the same thing.

    I will take this opportunity to say that of all the forums I have used over my entire computer life, programming forums are the worst by far. For whatever reason programmers seem to be the most sarcastic and nasty and otherwise less than helpful people across the internet.

    JTextField or TextBox. Same thing. Doesn't matter what you call it. Car? Vehicle?

    You did not help me in giving me any useful info concerning my question.

  4. #4
    Member
    Join Date
    May 2017
    Location
    Eastern Florida
    Posts
    68
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default Re: I'd like to do this but am totally new to working with a GUI

    It is very useful when trying to find something if you use the correct name. John Joe gave you the name of a java class that you could research.
    The name text box is not part of java.

    Perhaps you should find another hobby where precision is not a requirement. computers are real dumb and need to be told exactly what you you want them to do. Misspell a word and the computer will be lost.

    If you'd like to try developing a GUI with the Swing classes take a look at the tutorial:
    http://docs.oracle.com/javase/tutori...ing/index.html
    Last edited by NormR; June 19th, 2017 at 10:38 AM.

  5. The Following User Says Thank You to NormR For This Useful Post:

    John Joe (June 21st, 2017)

  6. #5
    Junior Member
    Join Date
    Jun 2017
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: I'd like to do this but am totally new to working with a GUI

    Perhaps you programmers who populate forums should learn a few things also. Like NOT making assumptions. NOT making the FALSE assumption that the reader knows what you are referring to. That assumption is almost always FALSE. If I was to tell someone who wants to learn how to play guitar that he needs to develop an economical picking hand he would not have a clue as to what I meant.

    Should I assume that my student knows how to tune his guitar? Should I assume that he knows the three types of augmented sixth chords? Should I assume that he knows how to hold his pick? Should I tell him to do research on Google to solve these problems?

    I don't think so. That would be very poor advice and even worse teaching. In effect I have done nothing for him.

    The same holds true for all you programmers out there.

    Get a clue.

    I asked a specific question. Who cares what the text box is called. It's still a text box no matter how you look at it.

  7. #6
    Member
    Join Date
    May 2017
    Location
    Eastern Florida
    Posts
    68
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default Re: I'd like to do this but am totally new to working with a GUI

    All I can say is: you are going to have a hard time.

    If you want posters with attitude, try this forum: http://stackoverflow.com/questions/tagged/java

    Another one with lots of helpers: https://coderanch.com/forums

  8. #7
    Member John Joe's Avatar
    Join Date
    Jun 2017
    Posts
    277
    My Mood
    Amused
    Thanks
    8
    Thanked 19 Times in 19 Posts

    Default Re: I'd like to do this but am totally new to working with a GUI

    You did not help me in giving me any useful info concerning my question.
    I don't think so. Using the correct name will easier for you to do the research. But it seems like you are not appreciate on that.

    Please learn the basic first before you work into GUI,at least knowing the name of the JAVA class.

    Should I assume that my student knows how to tune his guitar? Should I assume that he knows the three types of augmented sixth chords?
    NOT really, but at least they need to know how does a guitar looked like.
    Last edited by John Joe; June 22nd, 2017 at 09:53 PM. Reason: Bold the sentences
    Whatever you are, be a good one

Similar Threads

  1. Cannot get buttons working in GUI program
    By Yeshibo in forum AWT / Java Swing
    Replies: 3
    Last Post: April 23rd, 2012, 12:59 PM
  2. Java GUI not working
    By bamgolfing in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 7th, 2012, 05:51 AM
  3. Replies: 1
    Last Post: April 26th, 2011, 08:47 AM
  4. Getting code working with gui
    By Nostromo in forum AWT / Java Swing
    Replies: 2
    Last Post: March 21st, 2011, 09:34 PM
  5. Totally stuck on this assignment
    By Sgiahatch in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 25th, 2010, 04:25 PM