Results 1 to 3 of 3
- 10-16-2009, 11:30 PM #1
Member
- Join Date
- Sep 2009
- Posts
- 14
- Rep Power
- 0
Do I make a new JFrame every time?
I have my main JFrame with all of my controls. When a user chooses File-> Open I'm opening a dialog window open that has ~5tb's, ddl's, JFileChooser and a few other controls. right now I have them mounted on a panel in a dialog window.
What is the correct way to do this in JAVA. Do I continue using the dialog box or do I create a new JFrame since there is a great amount of user input required on the newly opened window.
thanks!
- 10-21-2009, 05:36 PM #2
you should be ok to reuse the same instance of the dialog. just use the setVisible() to hide the dialog when it is not in use. Might also need some kind of cleanup or reset of some of the properties on the dialog. I usually invent a doDisplayDialog() and a doHideDialog() methods, which internally the doDisplayDialog() can do what ever resetting or clearing of variables I expect to be blank every time the dialog is shown.
- 10-21-2009, 05:51 PM #3
Member
- Join Date
- Sep 2009
- Posts
- 14
- Rep Power
- 0
Similar Threads
-
How to make a modal JFrame?
By surot in forum New To JavaReplies: 20Last Post: 06-11-2011, 11:31 PM -
Make multiple JTextFields focus at the same time.
By toymachiner62 in forum AWT / SwingReplies: 6Last Post: 10-09-2009, 02:59 AM -
How to make a Jframe un-focusable when another Jframe is active?
By Robert_85 in forum Advanced JavaReplies: 4Last Post: 04-22-2009, 11:02 PM -
Class Time - represents time of day
By verbazon in forum New To JavaReplies: 1Last Post: 04-13-2009, 01:06 AM -
how to make a loading bar in jframe
By arunkumarinfo in forum NetBeansReplies: 2Last Post: 01-31-2009, 02:58 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks