Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Default button



Hi,

I'm trying to set a button to have the 'blue' default look and listen to the 'Enter' key. I use this code:

<x-tad-bigger>JButton okButton = </x-tad-bigger><x-tad-bigger>new</x-tad-bigger><x-tad-bigger> JButton(app.getActions().getActionConsultOK());
okButton.setDefaultCapable(</x-tad-bigger><x-tad-bigger>true</x-tad-bigger><x-tad-bigger>);
app.getRootPane().setDefaultButton(okButton);

</x-tad-bigger>
But it still looks the same as the other buttons and does not have the desired behaviour.

Does anyone know something that could be of conflict when setting this?

Thanks, Josef
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.