• Post Reply Bookmark Topic Watch Topic
  • New Topic

Nothing shown on a JLayeredPane?

 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created a JPanel from the GUI builder (BorderLayout), then put a JLayeredPane over top of it, then a JLabel, I put an icon in the JLabel
I use a DEFAULT_LAYER for the JLabel and some POPUP_LAYER for the buttons and search bar.
I have set all Panels to be opaque. Why is that?
Thanks
Jack
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post your SSCCE so we can take a look
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maneesh Godbole wrote:Post your SSCCE so we can take a look


Sorry, Maneesh, I've solved this problem, let's move onto the next one.
Thanks for continuous assistance!
Jack
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well done!
If you can briefly describe what the problem was and the your solution, it would help future users with similar issues.
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maneesh Godbole wrote:Well done!
If you can briefly describe what the problem was and the your solution, it would help future users with similar issues.


I created a JPanel, created a JLayeredPane on top of it, without using any BorderLayout, and adding JLabels on DEFAULT_LAYER,
and other JButtons on POPUP_LAYER. The JPanel is opaque while the JLayeredPane isn't
thanks
layeredpane solution.png
[Thumbnail for layeredpane solution.png]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!