I'm writing a typing application where jbutton should react on key pressing by changing it's color, but the Mac LAF refuses to change it and i don't want use other LAFs. Is their any way to use "system clicking effect" (button becomes gray for a sec) on key pressing event?
Asked
Active
Viewed 237 times
1 Answers
2
1) easiest and by default correct way -->
- change
Mac L&F
with one of (todays
) custom Look and Feels
2) possible way --> required deepest knowledge of Swing, Java and LookAndFeels,
- not
MacOSX
user, don't know if you are usingSystemLookAndFeeel
orMetalLookAndFeel
, but you could be able get and override fromMetalButtonUI/QuaquaButtonUI
extendsBasicButtonUI
, maybe this one can help you
-
+1 Yes, this depends on the UI delegate; I've used this [alternative](http://stackoverflow.com/a/3420431/230513). – trashgod Feb 21 '12 at 19:28