• Post Reply Bookmark Topic Watch Topic
  • New Topic

Multiple froms / pages

 
Mousa A. Rafi
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the best way to create a multi-form (as usually said in Microsoft languages) application? Suppose I'm making an application that has two toolbar buttons. Clicking one displays the phone numbers of people and clicking the other takes me to another form that is used for entering new phone number info. Other Languages usually have built in functionality for this. How do I do it in Java?

One solution I thought of is creating different JPanels / JPanes for different forms and using one in setContentPane() of the main JFrame as needed.

Better suggestion, or a better approach practiced by developers is needed.
 
Lionel Badiou
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

As far as I understand your problem... Tabbed panes should give you a solution.

Best regards,
 
luc comeau
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I am infact looking to ask the same question,i have an interface that displays questions to a user for them to answer, and once a certain threshold number is reached i would like it to go to another "form"-to use the VB term-.In java it seems like you can only make dialogues pop up, but this isnt what im looking for, im looking to do much like the initial postee wants to do, i want it to go from the questions screen to a screen that have a fill out form on it or something,

The person who suggested tabs i dont think that is a good solution because a tab is always visible and the user would probably want to click it if they saw it, this could cause problems.Also its not generally the norm to have a tab for filling out information, i don't think.Usualy applications like mine you do some stuff(answering the questions) then you are then "given permission" to go to the next form.

I hope i am not misjudging the original postee's post, if so "lightening bug"
could you please tell me and i'll add a seperate post, as to not intrude on yours.thanks much

If im not misjudging hopefully some of the java geru's on this forum will have an answer for us!

-luc
 
Mousa A. Rafi
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
luc comeau, you understood exactly what I meant. About tab, I have the same opinion. It don't feet into the scenario we are talking about. Hopefully someone who knows the solution will understand the question!
 
sasi kala
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

For Multiple screens JDesktopPane is very much usefull in java. Like MDI(Multiple Document Interface) in vb, we can call several internal frames.

see these linksJDesktopPane

JInternalFrame

All The Best
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mousa,
Perhaps the CardLayout will be of help?

Also, you may be interested in the following article, from the Swing Connection Web site, entitled CardPanel - An Alternative to CardLayout.

Good Luck,
Avi.
[ February 14, 2005: Message edited by: Avi Abrami ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!