aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to invoke jpanels Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to invoke jpanels " Watch "How to invoke jpanels " New topic
Author

How to invoke jpanels

Pubudu Dissanayake
Greenhorn

Joined: Jul 22, 2010
Posts: 7
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

Joined: May 03, 2008
Posts: 4664
    
    5

What's the problem?


luck, db
There are no new questions, but there may be new answers.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> ...I don't know how to invoke more JPanels separately actually one by one on the same Jframe...

use a CardLayout?
Pubudu Dissanayake
Greenhorn

Joined: Jul 22, 2010
Posts: 7
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

Joined: May 03, 2008
Posts: 4664
    
    5

1. Did you read the CardLayout documentation yet?

2. Further recommended reading: How to ask questions the smart way
Petar Thomas
Ranch Hand

Joined: Oct 11, 2009
Posts: 234
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

Joined: Oct 27, 2005
Posts: 19794
    
  20

Petar Tomičić wrote:I'm the Considerator.

Is that a relative of the Terminator?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Petar Thomas
Ranch Hand

Joined: Oct 11, 2009
Posts: 234
I think that Considerator isn't Spanish, but I'm not sure.
Pubudu Dissanayake
Greenhorn

Joined: Jul 22, 2010
Posts: 7
thank you guys
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to invoke jpanels