|
-
September 21st, 2011, 04:06 AM
#1
Mouse event question
when press mouse on a component(such as a text area),How to get the component's name use mouse event?
my code like this:
///////////////////////////////////////
public void mousePressed(MouseEvent e)
{ Syesem.out.println(e.getSource());
}
/////////////////////////////////////////
but "e.getSource()" show many information of the component but doesn't show the name of the component.
What Should I do?
thank you!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|