wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes JPanel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JPanel " Watch "JPanel " New topic
Author

JPanel

Shahjehan Tariq
Greenhorn

Joined: Feb 17, 2006
Posts: 3
Hello

I am working in Swings and have a problem. I have a Main panel on which i have added a button and set a image on that buttons. on main panel i add different panels having buttons on them. i have set panels Opaque to false but when programe excutes only image which is in main panel appear and other panels with button not appear. when i roll over the mouse then buttons appears. please guide how buttons can be appear directly with out roll over of mouse

Thanks,

sjehan


-sjehan
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> please guide how buttons can be appear directly with out roll over of mouse

post your code
Nageswar Kakolla
Ranch Hand

Joined: Jan 16, 2006
Posts: 71
specify which Layout you are using and before you add any subpanels to Mainpanel, JPanel.setLayout(new BorderLayout()); or any layout.

Also check when you are add subpanel to main panel, is it correctly ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JPanel
 
Similar Threads
Component.setEnabled()
Drag and drop over an iframe
JViewPort problems
Custom (image) button
Loading and unloading a panel