File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating a GUI from text based program

 
mike korb
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For my java class i have to create a GUI that will calculate the final price of a purchase item using values entered by the user. I have already wrote the program and it works perfectly, but it is text based right now and I suck at creating GUI's. Here is what I have so far...



PurchaseReduxPanel



it's a bit messy and i apologize in advance for it.
 
Maneesh Godbole
Saloon Keeper
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You had any particular question in mind?
If you are wondering in general, how to write your own UI, check out http://docs.oracle.com/javase/tutorial/uiswing/components/frame.html

This would be better suited on the UI forums.
Moving....
 
mike korb
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maneesh Godbole wrote:You had any particular question in mind?
If you are wondering in general, how to write your own UI, check out http://docs.oracle.com/javase/tutorial/uiswing/components/frame.html

This would be better suited on the UI forums.
Moving....



Okay, I got the program to compile through TrafficLightPanel, but I can't get it to compile through my TrafficLight mainframe can someone please help? Here is what I have so far.



TrafficLightPanel
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
both have main()
both extend JFrame

you can't add a window/frame to another window/frame:
frame.getContentPane().add(new TrafficLightPanel());
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic