MouseListener and hiding components.

P

Peter the Swede

Best groupmember,

I have a JPanel EditCoursePanel that consists of
- JPanel with JButtons
- JTabbedPane with a number of tabs with a component inside each tab

The layout is formed with GridBagLayout.

I tried to connect a mouselistener to EditCoursePanel to recive information
about where on the Panel I'm clicking. It seems like the other components of
EditCoursePanel are hiding the Panel it self, I don't get any output when I
click. If I connect a mouselistener to for example one of the components of
JTabbedPane I get response.

Is it a way of getting around this? What I want to do is to get the Point on
the Panel where I click, and what component that I'm clicking on.

Any hints would be appreciated,

Cheers, Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,151
Latest member
JaclynMarl
Top