Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

trying to add label

 
Candy Bortniker
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a small simple window that is just to test my bean with. I tried to add a label but it does not show on the window. What do I need to do differently?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are creating lblGAN, and are adding it to the content pane, but you never call setBounds() on it. This is one (of many) reasons using a null layout is discouraged.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic