• Post Reply Bookmark Topic Watch Topic
  • New Topic

JFrames or...  RSS feed

 
frank braunstein
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a GUI with a simple JFrame in it (that in turn contains some JPanels with JTextfields, but thats not the problem). Now i want the user to give me his/her inputs and after he hits the calculate button a new JFrame shall be opened with the result. At this time the main-Frame must not be reachable via mouse clicks or whatever. No, i don't want an Joptionpane-dialogbox, as i will integrate some other advanced functions (that do not fit into an dialogbox) in the next frame.
I can imagine some approaches (tell me what you think about them):
-layered Pane (though i never used it) instead of an extra Frame
-another panel that is setVisible() after hitting the calculate-button
-Desktoppane (never used, but in the netbeans IDE its icon seems to fit)
 
Rob Spoor
Sheriff
Posts: 20903
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about a modal JDialog?
 
Campbell Ritchie
Sheriff
Posts: 53779
128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our GUIs forum
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!