cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Eyal_Goren
Level 6

Mouse actions

Hi,

How can I support mouse right click on the Swing dialogs?

Thanks
Eyal
Labels (1)
0 Kudos
(4) Replies
CChong
Level 11 Flexeran
Level 11 Flexeran

Eyal,

You can only do this with the "5.x" type of swing custom dialogs that you can do in IS 11. See the docs for "5.x Panels". In those types of panels, you create a SwingImpl class. You can make that class implement java's MouseListener interface. You can then have events in the panel class such as mouseClicked(), mouseEntered(), mousePressed(), etc.
0 Kudos
Eyal_Goren
Level 6

Hi Brian,

Thanks for the reply, but what about the newest dialogs, do they support it?

Eyal
0 Kudos
CChong
Level 11 Flexeran
Level 11 Flexeran

Eyal,

No, in the new dialogs, the acutal UI implementation is not exposed in code, thus you do not have the ability to add listeners to the controls on the panels. The code that you write for the "new" panels is only for event code.

I suppose that it would be possible to implement a mouse listener in a custom control, which you could then add to one of the "new" types of dialogs, but that mostly would defeat the purpose of using the new dialogs instead of the 5.x dialogs.
0 Kudos
Eyal_Goren
Level 6

Thanks Brian,

We will just wait for future release.

Thanks
Eyal
0 Kudos