Results 1 to 8 of 8
Thread: Secondary JFrame
- 07-30-2010, 11:24 PM #1
Member
- Join Date
- Jul 2010
- Posts
- 7
- Rep Power
- 0
Secondary JFrame
Hi All,
I am new to java swing and awt. Any help is appreciated a lot.
I am trying to create a swing application/frame which while starting up should show a secondary frame/dialog and collect some information from the user. This information collected from the secondary frame should be used to start drawing in the GLCanvas in the primary JFrame.
How do I do this?
I tried the following: (but got stuck)
I have two classes-one for the primary frame and another for secondary both derived from JFrame.
In the primary classes constructor, I create the secondary frame and make it visible and on top. Thus while starting the application it shows the primary frame and the secondary frame.
But I just want the program to wait there to close the secondary frame so as to continue with the primary frame..
Is this possible???
regards
Jith
- 07-31-2010, 12:19 AM #2
To have the first class with the frame wait on the second class, use a modal dialog for the second "frame". Create your GUI in a JPanel and add it to the dialog instead of to a JFrame.I just want the program to wait there to close the secondary frame
- 08-09-2010, 06:46 PM #3
Senior Member
- Join Date
- Jul 2010
- Posts
- 124
- Rep Power
- 0
If you making this from scratch:
after extending the class to a JFrame, create a new JFrame inside the init():
Java Code:public void initcomponents(){ JFrame frame = new JFrame(); }
- 08-09-2010, 06:50 PM #4
Rubbish, the OP needs a JDialog. There is no need to extend a JFrame from his requirements as Norm already posted. What is the init() method? Which class implements that?
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 08-09-2010, 07:07 PM #5
Senior Member
- Join Date
- Jul 2010
- Posts
- 124
- Rep Power
- 0
I was referring to the component loader, which can be whatever you desire
- 08-09-2010, 07:18 PM #6
Oooh, good you didn't refer to the left spinning drambuse, which can also be whatever you desire, because I don't know that one either.
Seriously, it's nice that you want to help, but if you want to help, stick to the API and try to find out what the OP's questions deal with, instead of having shots in the dark.Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 08-09-2010, 08:21 PM #7
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,407
- Blog Entries
- 7
- Rep Power
- 17
-
Similar Threads
-
to pass a parameter from a jframe children to its jframe mother
By anix in forum NetBeansReplies: 5Last Post: 06-14-2010, 06:10 PM -
Trigger main thread method from secondary thread?
By DigitalMan in forum Threads and SynchronizationReplies: 8Last Post: 01-26-2010, 02:13 AM -
Java not recognizing UNIX secondary group
By PaulBinni in forum NetworkingReplies: 1Last Post: 11-18-2009, 03:45 PM -
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 -
changing the secondary ID of a view
By schuetzejanett in forum SWT / JFaceReplies: 0Last Post: 08-08-2007, 07:28 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks