Win a copy of Murach's Python Programming this week in the Jython/Python forum!
    Bookmark Topic Watch Topic
  • New Topic

GUI  RSS feed

 
Kyle Ruey
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Report post to moderator
So after much loss sleep I finally got my inventory program to work the way it is supposed to. Now the next thing in the assignment is to add a GUI that displays each product individually also have to add a next previous last and first button. That being said I creating a new JFrame in netbeans( where it allows you to design the panel). Now that I have that created I have no clue where to put the code at make the JFrame display the product information.
 
Jason Bullers
Ranch Hand
Posts: 111
8
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
What version of Java are you using and are there any requirements on the technology you should be using for creating the GUI? JavaFX is the latest GUI toolkit in the Java ecosystem, and if you are allowed to use it, I'd suggest learning that rather than Swing as that seems to be where the focus is right now (I'm not sure how much longer Swing will be directly supported). If you can't use that and are supposed to use Swing for the assignment, that's fine too; there's plenty of information out there about it.

Personally, I'd avoid using GUI builders until you have an understanding of how to write GUI code. The code they generate can be confusing when you aren't really sure how all the parts work together. I'd suggest looking at either of these tutorials to try and get started with your GUI. If you get something up on the screen and are still having problems with it, post your code and we can have a look at what might be wrong.

Swing tutorial
JavaFX tutorial
 
Campbell Ritchie
Sheriff
Posts: 53720
127
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please show us the code if it is working. Don't try to display anything on a frame. Frames are intended to contain other things and sit against the computer's desktop. You put the display in other things.

Do you have a public interface to an inventory app? Can you call add methods or find methods?
 
Kyle Ruey
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Report post to moderator
This is what I have so far.

The GUI



IventoryStarter















When I run the program the window pops up that list all the Jlables and text fields I just dont know how to get the product information to display one at a time in the GUI
 
Campbell Ritchie
Sheriff
Posts: 53720
127
  • Mark post as helpful
  • send pies
  • Report post to moderator
You appear to be asking nothing more than in this thread, so please confine all discussion to that one thread.

I am going to lock this thread.
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!