posted 23 years ago
Hi
How do I get a rectangular focus around the text of a label,(when you click on a swing button, a rectangle appears around the text of the button to show that it has recieved focus, the respective properties for the button are : setRequestFocusEnabled(boolean) & setFocusPainted(boolean))
But, the label does'nt have the setFocusPaint property which draws the rect enclosing the text. How can this be done ?!!
I've added a mouseclick event to the label & am trying to draw a rectangle around the text, but since the text position depends on the alignment position of the text, I've stopped at this point.One more question is how do I get the X & Y position of the text within a label or a button depending on the alignment property?!!
Thanks
Meghna