Multiple JFrame

Discussion in 'Java' started by kandy71@gmail.com, Sep 24, 2006.

  1. Guest

    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?
     
    , Sep 24, 2006
    #1
    1. Advertising

  2. IchBin Guest

    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/tutorial/uiswing/components/dialog.html

    Dialog API:
    http://ozark.hendrix.edu/linux/docs/java-5-api/java/awt/Dialog.html
    JOptionPane API:
    http://ozark.hendrix.edu/linux/docs/java-5-api/javax/swing/JOptionPane.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-)
     
    IchBin, Sep 24, 2006
    #2
    1. Advertising

  3. 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.
     
    Andrew Thompson, Sep 24, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Passero
    Replies:
    6
    Views:
    3,285
    Tassilo Horn
    Jul 5, 2003
  2. René Kikkenborg

    JFrame URL Link

    René Kikkenborg, Jul 8, 2003, in forum: Java
    Replies:
    1
    Views:
    1,772
    René Kikkenborg
    Jul 9, 2003
  3. jakester
    Replies:
    3
    Views:
    1,904
    jakester
    Apr 3, 2007
  4. Bojan

    Multiple JFrame focus

    Bojan, Apr 2, 2009, in forum: Java
    Replies:
    3
    Views:
    1,134
    Knute Johnson
    Apr 2, 2009
  5. Replies:
    2
    Views:
    442
    markspace
    Aug 27, 2012
Loading...

Share This Page