Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • 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: 21087
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about a modal JDialog?
 
Campbell Ritchie
Marshal
Posts: 55672
161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our GUIs forum
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!