Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Multiple forms without multiple windows

Reply
Thread Tools

Multiple forms without multiple windows

 
 
doug
Guest
Posts: n/a
 
      01-26-2004
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
 
Reply With Quote
 
 
 
 
Ike
Guest
Posts: n/a
 
      01-26-2004
One dialog, using CardLayout as the layout manager perhaps?
-Ike

"doug" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> 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



 
Reply With Quote
 
 
 
 
Chris Smith
Guest
Posts: n/a
 
      01-27-2004
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
 
Reply With Quote
 
Tony Morris
Guest
Posts: n/a
 
      01-27-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)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



 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      01-27-2004
"Chris Smith" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)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


 
Reply With Quote
 
doug
Guest
Posts: n/a
 
      01-27-2004
> | 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
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      01-27-2004
"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


 
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
forms authentication -- expired forms cookie vs. not provided forms cookie Eric ASP .Net Security 2 01-27-2006 10:09 PM
Forms authentication - Multiple login forms based on directory acc Keltex ASP .Net Security 1 01-24-2006 03:06 PM
How to determine if context is Windows Forms or Web Forms Arsen V. ASP .Net 7 08-06-2005 09:24 AM
embedded windows forms into web forms for control =?Utf-8?B?ZGF2aWQ=?= ASP .Net 2 04-10-2005 01:07 PM
Web Forms VS Windows Forms Brendan Miller ASP .Net 2 08-11-2003 09:05 PM



Advertisments