• Post Reply Bookmark Topic Watch Topic
  • New Topic

Blinking Text in JLabel

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Any idea how to make a text-string blinking in JLabel?
Thanks.
Sabbir
 
Frank Hale
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
maybe you could subclass the JLabel and add in a timer which paints your text in black then in the background color of the label which would make it disappear and just paints it back in black and repeats those two states forever. Its kind of a crude way but it may work.
Frank
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know how to use Timer.
Code sample or any pointer will be a great help.
Regards,
Sabbir
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!