java button and check box

I have set help on togglebutton and check boxes. When I click on them, I initiate help.

The problem is button also get clicked and start doing actionperformed.

and same problem is with checkbox.

I don't want my checkbox or button to perform action performed when I have my context sensitive help on.

[326 byte] By [Angel6a] at [2007-11-27 6:31:06]
# 1

I'd suspect the best way to do that is a glasspane that covers the app when the CSH is on, and when you click, it intercepts the mouse event, determines which component is being clicked over and then finds the relevant help content (however that is controlled).

Amongst other things, check javax.swing.SwingUtilities

Message was edited by:

bsampieri

bsampieria at 2007-7-12 17:55:58 > top of Java-index,Java Essentials,Java Programming...
# 2
In your actionPerformed method:if (!helpOn) { // do the action}
DrClapa at 2007-7-12 17:55:58 > top of Java-index,Java Essentials,Java Programming...
# 3
I gave that if conditionif(mainHelpOn)return;I did the same but when I initiate help I turn this variable off.What would be the good place to turn this variable off.I put it in MouseExit, but still actionperformed is working.
Angel6a at 2007-7-12 17:55:58 > top of Java-index,Java Essentials,Java Programming...