| Author |
labels and events
|
david allen
Ranch Hand
Joined: Sep 27, 2002
Posts: 185
|
|
i am working on a uni assignment and we have to make a calculator using labels. I am having troulbe associating a mouce click with a label. Can this be done and if so how??? thank you david
|
 |
Chantal Ackermann
Ranch Hand
Joined: Sep 28, 2000
Posts: 508
|
|
hi, attach a MouseListener to the labels: label.addMouseListener(new MouseAdapter() { /* implement the interface methods: * the code that shall be executed in reaction * on mouse events. */ }); this method is inherited from java.awt.Component. chantal
|
 |
david allen
Ranch Hand
Joined: Sep 27, 2002
Posts: 185
|
|
thank you for that it is now working fine david
|
 |
 |
|
|
subject: labels and events
|
|
|