This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Applets and the fly likes Panel added to frame is not showing up Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Panel added to frame is not showing up" Watch "Panel added to frame is not showing up" New topic
Author

Panel added to frame is not showing up

Erik Jansen
Greenhorn

Joined: Dec 06, 2011
Posts: 12

Hi,

I have made an applet that displays two selection lists. After selecting a value from either of these lists and pressing a button, I'd like to show a different frame (or a panel inside the current frame) with a new interface customized to the selection.

Currently I have a class selectionPanel which looks something like this:


In my main class I call this method after pressing the button as follows:


The newly added panel is not showing up in my main frame. I've tried calling pack() or validate() (suggested in other posts) but this doesn't seem to solve the problem. Do you guys (and possibly girls) have any ideas?
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

It rather looks like you need to use a CardLayout.


luck, db
There are no new questions, but there may be new answers.
Erik Jansen
Greenhorn

Joined: Dec 06, 2011
Posts: 12

Thanks, I'll have a look!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Panel added to frame is not showing up
 
Similar Threads
Adding components dynamically
Marcus #16
Two or more activities
Button not visible inc Frame
Getting my main class and GUI components to talk without inner classes