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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "ImagePanel with components" Watch "ImagePanel with components" New topic
Author

ImagePanel with components

Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
I have created a panel that displays a background image as below:-



But I need to add components to it. I'm doing this:-



Problem is, whilst I see the background image and don't see the buttons.

Do I need to change the ImagePanel class or something?

Cheers in advance!
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2152
    
    7
Don't use a "null layout". Why did you include that line if you don't know what it does?

Also, there is no need to create a custom component for this, you can just use a JLabel and then set the desired layout manager.
 
Consider Paul's rocket mass heater.
 
subject: ImagePanel with components
 
Similar Threads
How to add image inside jPanel ??
placing image on jpanel and then add other components
Problem Updating a JButton
RE: image ico
Balls are not moving