Solved

One Applet, Multiple views

Posted on 1998-06-05
3
298 Views
Last Modified: 2012-06-21
I am writing a database applet that will have multiple 'views' that collects differnt bits of data in the browser sort of like a 'wizard' concept.  My question is:
How do I organize the diffent views.  I am using Symantec Visual Cafe 2.5.  In J++ I noticed that they generate their gui code through a resource wizard.  It looks like they use the Layout manager object to define a particular 'view'.  Is there  better way to do this? Using Canvas, or Panel ?
What should I do
I want one applet, multiple views.
Thanks,
Georg
0
Comment
Question by:georita
3 Comments
 

Accepted Solution

by:
muesli earned 50 total points
Comment Utility
Hi,

The easy / standard way to create more complex user interfaces is to have many panels, each with it's own layout manager.  The panels are then nested to create the user interfaces you want.  For a "wizard"-like dialog, one way would be to use a "tab panel" widget.  I'm sure that visual cafe comes with one. A tab panel works by flipping between different sub-panels.

You can configure it to have one sub-panel/tab for each 'view'.  You can put buttons on the bottom of each view to make it look like a wizard with "next" and "previous" on them. You'd configure them to send a message to the tab panel to flip to the proper tab when clicked.

On the last tab, you'd have a "finished" button that would cause all of the data to be saved.  You could make it enabled or disabled depending on whether the user filled in enough information.

-------

A related idea is:  what to do when the data has been entered?  How should the applet appear?  You can put the tab panel into another panel with a "CardLayout".  This also flips between multiple panels, but without the tabs - only one panel is visible at a time.  You could have this CardLayout panel contain two sub panels:  1) A panel with a label and button saying "Click here to enter the information", and 2) A Panel containing the card layout described above.  The "finished" button on the tab panel would cause this "outer" CardLayout to flip back to the introductory sub panel.  

(I hope this talk about all the different panels hasn't been too confusing!)
0
 

Expert Comment

by:boton
Comment Utility
Hi
I would try the Tab Panel component, adding 2 buttons (previous-next) to the bottom of each panel addded.
Using the interaction wizard to trigger (button) to next tab or previous tab.
on the last pane a review and rewind options to correct mistakes.
I hope this can help you
Beto
0
 

Author Comment

by:georita
Comment Utility
Thanks,
I figured it out myself already.  Thanks for the answer tho
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now