Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to invoke jpanels

 
Pubudu Dissanayake
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys

I'm having a problem regarding Jpanels so I don't know how to invoke more JPanels separately actually one by one on the same Jframe I'm dealing with 15+ jpanels so it's really helpful to me

Thank you
 
Darryl Burke
Bartender
Posts: 5126
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the problem?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> ...I don't know how to invoke more JPanels separately actually one by one on the same Jframe...

use a CardLayout?
 
Pubudu Dissanayake
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actually I want to hide jpanels , I'm dealing with a large registration form so it has 15+ jpanels if someone refer that form(frame) it so complicated .please consider about my problem

Thank you
 
Darryl Burke
Bartender
Posts: 5126
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Did you read the CardLayout documentation yet?

2. Further recommended reading: How to ask questions the smart way
 
Petar Thomas
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm the Considerator.

You can create each JPanel object separately, and add components to it, and you can change JPanel objects in one JFrame with setContentPane( paneObject ), after which it is good to call revalidate.

I advice you to read about panes in Swing Tutorial, like for example,
http://download.oracle.com/docs/cd/E17409_01/javase/tutorial/uiswing/components/rootpane.html
How to use RootPanes

But I think CardLayout solves the problem, no?

 
Rob Spoor
Sheriff
Pie
Posts: 20533
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Petar Tomičić wrote:I'm the Considerator.

Is that a relative of the Terminator?
 
Petar Thomas
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that Considerator isn't Spanish, but I'm not sure.
 
Pubudu Dissanayake
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you guys
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic