This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes trying to add label Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "trying to add label" Watch "trying to add label" New topic
Author

trying to add label

Candy Bortniker
Ranch Hand

Joined: Mar 17, 2003
Posts: 123
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

Joined: Oct 18, 2000
Posts: 4121

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.


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: trying to add label
 
Similar Threads
"add" method
Save information in SQL database using timer
Resizing components
JDialog Opens Very Tiny
making a class visible