• Post Reply Bookmark Topic Watch Topic
  • New Topic

JLabel erase during RT.

 
Asaf Karass
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All!
I got one simple questions.
how can I delete a JLabel during run time?
like after an event?
thanks,
Asaf.
 
Matt Senecal
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might try using JFrame.remove(Component comp). That'll remove the component, but you may have to trigger a redraw (using pack(), or some such) afterward to see the effect.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!