Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Im using Java 1.3 for developing a Swing interface that contains a label and a button. The label associate with ToolTip. I need to perform a simple task , I want the ToolTip to be displayed when I press on the button (instead of mouse over on the label). I know that I have to fake a mouse event on the label to get this trick to work. I did it with the following code but its not work: public class NewToolTipTest extends JFrame public NewToolTipTest() showTip = new JButton( "Show Tip" ); addWindowListener( new ExitHandler() ); public static void main( String[] args ) private class ExitHandler extends WindowAdapter private class TipActivate implements ActionListener System.out.println( "ActionEvent launched!"); Any replies will be best appreciated Replies:
|
Sponsored Links
|