Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mouse Events and User Defined Class

Status
Not open for further replies.

Watts

Programmer
Jan 18, 2001
80
US
I have developed my own class which consists of TextField and 2 DirectionButtons. This Class extends to a Panel and has all of the goodies that go along with that class except the following: I want to addMouseListener to my Object to handle mouseEntered and mouseExited events. As you'd expect, these events only get added to the Panel and not to the componenet residing on the panel. How do I encompass the other 3 componenets in this MouseListener? Keep in mind that I would like to keep the other componenets private.

The reason I want to do this is so that anyone who uses this Class will be able to just add listeners very easily like any other component without having to do anything special. Basically I have created my own componenet.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top