• Post Reply Bookmark Topic Watch Topic
  • New Topic

Trouble adding JLabels to JLayeredPane  RSS feed

 
Piotr Gajowy
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

could anyone tell me what's wrong here?

 
Campbell Ritchie
Sheriff
Posts: 55351
157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to tell us what is going wrong, and what you would like to happen. If we don’t know what “doesn’t work”, we cannot help.
 
Piotr Gajowy
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, sorry if it was unclear. DOES NOT WORK means it does not appear on the screen. If I outcomment the button part, all I see is grey background. If I run it like this, all I see is a button. Why labels are not shown?
 
Campbell Ritchie
Sheriff
Posts: 55351
157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure whether the problem is that you are not using the Layout, but if you alter the bounds of the three Components, you get thisNow all three components are visible. Not sure I can help any more, sorry. You have already obviously read the Java Tutorials.

Anybody else?
 
Piotr Gajowy
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Helps. Your solution works, Thanks!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!