I have JLabel with an icon and text. Is there any possibility to hide only JLabel’s text? I don’t want to hide whole component (setVisible(false)), but only text, so an icon remains visible. I’d like to still use getText and setText methods.
Thanks for Your help!
As far as I’m concerned, there’s no direct way to do this. But you could try some of the following:
Here’s an example of what I mean: