Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Multiple JFrame

Reply
Thread Tools

Multiple JFrame

 
 
kandy71@gmail.com
Guest
Posts: n/a
 
      09-24-2006
Hi,
I try to develop my first graphical interface with java.
Since I need to use an application with different input windows, I need
to open these windows deciding with a menu when I need them. I would
like to know if my approach is corret.
I open for every windows a new jframe, however, I believe the it is not
the right way since all the frame are not connected and the do not
depend from the main frame.
Any suggestion?

 
Reply With Quote
 
 
 
 
IchBin
Guest
Posts: n/a
 
      09-24-2006
wrote:
> Hi,
> I try to develop my first graphical interface with java.
> Since I need to use an application with different input windows, I need
> to open these windows deciding with a menu when I need them. I would
> like to know if my approach is corret.
> I open for every windows a new jframe, however, I believe the it is not
> the right way since all the frame are not connected and the do not
> depend from the main frame.
> Any suggestion?
>


You want to have one JFrame and then you can open JDialogs from the
JFrame making them model. When you display a JDialog the first parameter
is the reference to the Calling JFrame.

Look at the JDialog api. You may even be able to use JOptionPane.

Article on JDialogs:
http://java.sun.com/docs/books/tutor...ts/dialog.html

Dialog API:
http://ozark.hendrix.edu/linux/docs/...wt/Dialog.html
JOptionPane API:
http://ozark.hendrix.edu/linux/docs/...ptionPane.html




--
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________ ________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      09-24-2006
IchBin wrote:
> wrote:

...
> > I try to develop my first graphical interface with java.
> > Since I need to use an application with different input windows,

.....
> You want to have one JFrame and then you can open JDialogs from the
> JFrame making them model.


Right concept, but a typo., that should be 'modal'.

The OP might also look into JOptionPane.showInputDialog()

Andrew T.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How Can I Get One JFrame To Appear Above Another JFrame clusardi2k@aol.com Java 2 08-27-2012 03:00 PM
Multiple JFrame focus Bojan Java 3 04-02-2009 05:46 PM
start a new JFrame from an existing one, and when old JFrame closes new one does not jakester Java 3 04-02-2007 11:13 PM
JFrame URL Link René Kikkenborg Java 1 07-09-2003 06:55 AM
Where is the JFrame constructor? Passero Java 6 07-05-2003 08:52 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57