|
-
July 27th, 1999, 05:16 AM
#1
Adding Mouse Listener
Hi Gurus,
I am using JPanel in JFrame. I added MouseListener, MouseMotionListener to JPanel. Now when i click on the JPanel, mousePressed event is executing. Then i added three JEditorPanes, in the JPanel. When i click on the JEditorPane, in the JPanel my mouseListener is not getting executed. Why this behavi
-
July 27th, 1999, 10:29 PM
#2
Re: Adding Mouse Listener
JPanel is a container. U will get any Event only if u click or do something in JPanel area. When u put a JEditorPane (or any component) in that JPanel, the area enclosing JEditorPane is kind of given to that component. The area excluding all the components in the JPanel is JPanel's area where u get the events.
If u want to handle events in the area of JEditorPane, u will need to add MouseListener to that component.
- UnicMan
http://members.tripod.com/unicman
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
|