• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

ImagePanel with components

 
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Rancher
Posts: 3069
24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
How do they get the deer to cross at the signs? Or to read this tiny ad?
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!