• Post Reply Bookmark Topic Watch Topic
  • New Topic

Add JLabel at runtime  RSS feed

 
Siddharth Mitesh
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,
I have 1 problem.
I want to add JLabel at runtime in Swing.
Reply as fast as possible.
Thanks
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just do it. You'll need to call validate() on the Container you added it to so that the layout is adjusted; this is something you need to do in any Java GUI if Components are added or removed at runtime.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!