Underline Button text
1 posts in topic
Flat View  Flat View

Posted By:   vinay_bhandari
Posted On:   Saturday, May 19, 2001 12:03 AM

I want to underline one character of the
java.awt.Button component for the purpose of short cut key.. Is there any
way .. In swing there is a method
setMnemonic(char ch).. but not in awt..
How can i do it in awt???

Re: Underline Button text

Posted By:   Finlay_McWalter  
Posted On:   Thursday, June 14, 2001 09:06 PM

There is no way to do this in AWT (yet another reason to use Swing).

You can, however, easily implement a button control of your own (by subclassing either Component or Panel) and you can draw the text label on it yourself, in any way you wish, including underlines.

About | Sitemap | Contact