Multiple forms without multiple windows

Discussion in 'Java' started by doug, Jan 26, 2004.

  1. doug

    doug Guest

    Hi, I have inherited a java app that uses multiple forms to gather
    user information. Each form opens it it's own frame so that at times
    there are up to ten windows open at once.

    I was thinking of converting most of them to dialogs. Each dialog
    would have quite a few textboxes and buttons but certainly doable.

    Is there a better way? I would like to have one frame showing a few
    input forms and using a few dialogs for simple input. I just think I'm
    overlooking something obvious.

    I can't use swing as the jvm doesn't support swing.

    I'm fairly new to java but have done lots of programming with vb where
    all forms are dialogs.

    The current app uses many global vars to maintain state and direct the
    action of each form. Definitely not a good way to go.

    TIA
    doug, Jan 26, 2004
    #1
    1. Advertising

  2. doug

    Ike Guest

    One dialog, using CardLayout as the layout manager perhaps?
    -Ike

    "doug" <> wrote in message
    news:...
    > Hi, I have inherited a java app that uses multiple forms to gather
    > user information. Each form opens it it's own frame so that at times
    > there are up to ten windows open at once.
    >
    > I was thinking of converting most of them to dialogs. Each dialog
    > would have quite a few textboxes and buttons but certainly doable.
    >
    > Is there a better way? I would like to have one frame showing a few
    > input forms and using a few dialogs for simple input. I just think I'm
    > overlooking something obvious.
    >
    > I can't use swing as the jvm doesn't support swing.
    >
    > I'm fairly new to java but have done lots of programming with vb where
    > all forms are dialogs.
    >
    > The current app uses many global vars to maintain state and direct the
    > action of each form. Definitely not a good way to go.
    >
    > TIA
    Ike, Jan 26, 2004
    #2
    1. Advertising

  3. doug

    Chris Smith Guest

    doug wrote:
    > Hi, I have inherited a java app that uses multiple forms to gather
    > user information. Each form opens it it's own frame so that at times
    > there are up to ten windows open at once.
    >
    > I was thinking of converting most of them to dialogs. Each dialog
    > would have quite a few textboxes and buttons but certainly doable.


    There's not a lot of difference between a "Frame" and a "Dialog" in
    Java. The only differences I'm aware of are that dialogs can be modal
    (whereas frames can't), and that dialogs have an "owner" which receives
    focus by default when they are dismissed. Unless one of these
    differences fits your needs, I don't see an immediate reason to convert
    from one to the other.

    > Is there a better way? I would like to have one frame showing a few
    > input forms and using a few dialogs for simple input. I just think I'm
    > overlooking something obvious.


    Ike's suggestion of using CardLayout to make the forms available in
    pieces (along with, perhaps, either tab-like or wizard-style buttons to
    switch pages) is a good one. (Too bad you can't take advantage of Swing
    here.)

    > The current app uses many global vars to maintain state and direct the
    > action of each form. Definitely not a good way to go.


    I don't envy you. Good luck! :)

    --
    www.designacourse.com
    The Easiest Way to Train Anyone... Anywhere.

    Chris Smith - Lead Software Developer/Technical Trainer
    MindIQ Corporation
    Chris Smith, Jan 27, 2004
    #3
  4. doug

    Tony Morris Guest

    Frame's are native windows, Dialog's aren't.
    A solution produced by using CardLayout can "usually" also be solved using a
    JTabbedPane.

    Depending on the requirements, I'd be investigating one of these two
    solutions.

    --
    Tony Morris
    (BInfTech, Cert 3 I.T., SCJP[1.4], SCJD)
    Software Engineer
    IBM Australia - Tivoli Security Software
    (2003 VTR1000F)


    "Chris Smith" <> wrote in message
    news:4.net...
    > doug wrote:
    > > Hi, I have inherited a java app that uses multiple forms to gather
    > > user information. Each form opens it it's own frame so that at times
    > > there are up to ten windows open at once.
    > >
    > > I was thinking of converting most of them to dialogs. Each dialog
    > > would have quite a few textboxes and buttons but certainly doable.

    >
    > There's not a lot of difference between a "Frame" and a "Dialog" in
    > Java. The only differences I'm aware of are that dialogs can be modal
    > (whereas frames can't), and that dialogs have an "owner" which receives
    > focus by default when they are dismissed. Unless one of these
    > differences fits your needs, I don't see an immediate reason to convert
    > from one to the other.
    >
    > > Is there a better way? I would like to have one frame showing a few
    > > input forms and using a few dialogs for simple input. I just think I'm
    > > overlooking something obvious.

    >
    > Ike's suggestion of using CardLayout to make the forms available in
    > pieces (along with, perhaps, either tab-like or wizard-style buttons to
    > switch pages) is a good one. (Too bad you can't take advantage of Swing
    > here.)
    >
    > > The current app uses many global vars to maintain state and direct the
    > > action of each form. Definitely not a good way to go.

    >
    > I don't envy you. Good luck! :)
    >
    > --
    > www.designacourse.com
    > The Easiest Way to Train Anyone... Anywhere.
    >
    > Chris Smith - Lead Software Developer/Technical Trainer
    > MindIQ Corporation
    Tony Morris, Jan 27, 2004
    #4
  5. "Chris Smith" <> wrote in message
    news:4.net...
    | doug wrote:
    | > Hi, I have inherited a java app that uses multiple forms to gather
    | > user information. Each form opens it it's own frame so that at times
    | > there are up to ten windows open at once.
    | >
    | > I was thinking of converting most of them to dialogs. Each dialog
    | > would have quite a few textboxes and buttons but certainly doable.
    |
    | There's not a lot of difference between a "Frame" and a "Dialog" in
    | Java.

    I actually thought the OP meant html
    frames* there, but now I reread it, I am
    not entirely clear.

    Could you clarify doug?

    * For those that may be unclear what I
    mean, you can specify a 'target' for an html
    link, which usually sends the output to
    a particular frame of a frameset. If the
    target is 'blank' (or something like that)
    or a frame that does not currently exist,
    a new browser window is opened..

    --
    Andrew Thompson
    * http://www.PhySci.org/codes/ Web & IT help
    * http://www.PhySci.org/ PhySci software suite
    * http://www.1point1C.org/ 1.1C - Superluminal!
    * http://www.AThompson.info/andrew/ personal site
    Andrew Thompson, Jan 27, 2004
    #5
  6. doug

    doug Guest

    > | There's not a lot of difference between a "Frame" and a "Dialog" in
    > | Java.
    >
    > I actually thought the OP meant html
    > frames* there, but now I reread it, I am
    > not entirely clear.
    >
    > Could you clarify doug?


    It is an application, not html.

    I've never seen an application spawn so many windows, it fills the
    task bar.
    I just thought opening a dialog box, retrieving the users variables,
    and closing it would more object like.

    For example, the logon screen captures the user info, validates it and
    creates another window, leaving the logon window intact. The next is a
    menu and when the user select an item, another window is created. The
    others screens have more info, maybe displaying 10 items, and 4 input
    boxes. That's why I as thinking modal input boxes might work best.

    I would just like to have one code object control the process, and
    have it call other objects to capture and display info.

    Thanks for your help
    doug, Jan 27, 2004
    #6
  7. "doug" ...
    | > | There's not a lot of difference between a "Frame" and a "Dialog" in
    | > | Java.
    ....
    | It is an application, not html.
    |
    | I've never seen an application spawn so many windows, it fills the
    | task bar.
    | I just thought opening a dialog box, retrieving the users variables,
    | and closing it would more object like.

    I will have to cede to others on the
    finer points of UI design, but I have
    been burning to ask you.

    Is it more logical to have some of these
    windows compacted into a more 'wizard-like'
    approach?

    ...of course that depends on the exact logic of
    the data collection, but if it can be done
    sequentially in a single window, that
    would have to be cleaner, from both
    an UI and logic POV.

    You might build the parts of a single
    object through successive cards on a
    cardlayout in a dialog, then return the
    object on close.

    | For example, the logon screen captures the user info, validates it and
    | creates another window, leaving the logon window intact.

    Why are they in a separate window at all?
    That is sounding to me like a perfect
    example for keeping both those within the
    same UI element.

    Just some thoughts.

    --
    Andrew Thompson
    * http://www.PhySci.org/codes/ Web & IT help
    * http://www.PhySci.org/ PhySci software suite
    * http://www.1point1C.org/ 1.1C - Superluminal!
    * http://www.AThompson.info/andrew/ personal site
    Andrew Thompson, Jan 27, 2004
    #7
    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. Brendan Miller

    Web Forms VS Windows Forms

    Brendan Miller, Aug 11, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    5,077
    Kevin Spencer
    Aug 11, 2003
  2. =?Utf-8?B?ZGF2aWQ=?=

    embedded windows forms into web forms for control

    =?Utf-8?B?ZGF2aWQ=?=, Apr 7, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    5,212
    =?Utf-8?B?ZGF2aWQ=?=
    Apr 10, 2005
  3. Arsen V.
    Replies:
    7
    Views:
    827
  4. Keltex
    Replies:
    1
    Views:
    395
    Dominick Baier [DevelopMentor]
    Jan 24, 2006
  5. Eric
    Replies:
    2
    Views:
    498
Loading...

Share This Page