Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-22-2007, 08:28 PM
Member
 
Join Date: Jul 2007
Posts: 4
gradon is on a distinguished road
mouse over on JButton
JButton b2 = new JButton ("Joke Break", new ImageIcon ("joke.gif"));
pane.add (b2);
b2.setBounds (25, 40, 125, 25);


b2.addActionListener (new ActionListener ()
{
public void actionPerformed (ActionEvent e)
{



//JokeTxt.setText ();
Joke ();
generateJoke ();



}

}


);

there is the code now i want to make it that when the person wants to click on the Button , when the mouse moves over teh button a message must appear can some1 help me with this
thanks
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-04-2007, 07:50 AM
Senior Member
 
Join Date: Jul 2007
Posts: 1,222
hardwired is on a distinguished road
You can set a rolloverIcon (AbstractButton class) for the button and you also have available the JComponent method setToolTipText.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mouse dragg not working Preethi AWT / Swing 1 02-08-2008 06:51 AM
The mouse and the cheese Don Quixote Java 2D 4 08-16-2007 12:55 AM
How to mouse-drag a JWindow? cruxblack New To Java 3 08-06-2007 11:52 AM
Use the mouse position susan Java Applets 1 07-29-2007 01:10 AM
Mouse over JButton sandor AWT / Swing 1 05-17-2007 11:15 PM


All times are GMT +3. The time now is 08:00 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org