I'm new to Java, I'm coding on NetBeans. The problem is that whenever I disable a control i.e jmenu.setEnabled(false) it still fires events! holy crap! how is it! :P
How can I prevent it?
From the javadoc:
Note: Disabling a lightweight component does not prevent it from receiving MouseEvents.
Note: Disabling a heavyweight container prevents all components in this container from receiving any input events. But disabling a lightweight container affects only this container.
You might want to check out disableEvents(long mask).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With