mouse over on JButton

code:

JButton b2 = new JButton ("Car sales", new ImageIcon ("car.gif"));

pane.add (b2);

b2.setBounds (25, 40, 125, 25);

b2.addActionListener (new ActionListener ()

{

public void actionPerformed (ActionEvent e)

{

//carTxt.setText ();

car ();

generatecar ();

}

}

);

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

[546 byte] By [GraDoNa] at [2007-11-27 11:25:17]
# 1

http://java.sun.com/docs/books/tutorial/uiswing/events/mousemotionlistener.html

hunter9000a at 2007-7-29 16:03:32 > top of Java-index,Java Essentials,Java Programming...
# 2

Point #1: Use code formatting tags

Point #2: Search google for "java tooltips" and go to the first link.

c0demonk3ya at 2007-7-29 16:03:32 > top of Java-index,Java Essentials,Java Programming...
# 3

button.setTooltipText().

sabre150a at 2007-7-29 16:03:32 > top of Java-index,Java Essentials,Java Programming...
# 4

> can some1 help me with this

...

yawmarka at 2007-7-29 16:03:32 > top of Java-index,Java Essentials,Java Programming...
# 5

holy sh*t lol

thanks alot

it works now and its really easy i didnt think it would be that easy

GraDoNa at 2007-7-29 16:03:32 > top of Java-index,Java Essentials,Java Programming...