File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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