3

What would be the easiest way to make plain text on a swing component have a glowing effect in the background?

Example: From http://i.imgur.com/3jtUm.png -> http://i.imgur.com/hXTOf.png

The difference may not be that noticeable but there's definitely a glow in the second image. Thanks in advance. And by the way I couldn't find any answers for this question in java.

Gilbert Le Blanc
  • 50,182
  • 6
  • 67
  • 111
injectv
  • 55
  • 7
  • Duplicate: http://stackoverflow.com/questions/3232675/how-can-i-create-a-drop-shadow-inner-glow-and-outer-glow-in-java-swing – halex Oct 01 '12 at 17:21
  • http://stackoverflow.com/questions/3232675/how-can-i-create-a-drop-shadow-inner-glow-and-outer-glow-in-java-swing this might be intresting? – Thousand Oct 01 '12 at 17:21

1 Answers1

4

The easiest way is probably to draw the text on top of a blurred version of itself. The blurred version will provide the "glow" around the edges.

You will probably need to experiment with the right amount of blur and level of transparency when drawing the blurred version to get the right effect.

For blurring techniques see: How do I blur an image?

Community
  • 1
  • 1
mikera
  • 105,238
  • 25
  • 256
  • 415