| It's pretty easy to create a good-looking Mac-like preferences UI with Swing, especially if you;re using Quaqua. Put all your pages into a CardLayout, Put that into the Center of a BorderLayout. In the North of the BorderLayout put a widget containing a JButton for each page, Wire them up and you're done. I have some code somewhere, but not on this machine....
Jerry On 11 Feb 2008, at 15:19, Tim Goeke wrote: The XCode created PrefPane.java is just a JFrame with one label and one button. Nothing too fancy at all - and while it's nice, it's not all that helpful.
The implementation seems to be pretty straight forward but tedious if you are starting from scratch.
- Tim On Feb 11, 2008, at 5:38 AM, Tom, BSc (Hons) wrote: If you create a new project in Xcode, you will be given the Preferences class for free. As I recall, it's a very basic template and doesn't have tabs or anything fancy like that.
Once Xcode generates this file for you, you can get rid of the rest of the project and simply transfer that file to where your other source files are located – unless, of course, you want to use Xcode to develop your application.
What's important about this class is that it sticks a Preferences menu item in the Application Menu and even wires it up to the standard keyboard shortcut for invoking the preferences pane: ⌘;
The only problem is that the pane isn't in full compliance with Apple's HIG in that it has an active minimise control. You can get around this by declaring the object as a JDialog, rather than a JFrame, but it might cause the menu bar to screw up and suddenly become part of the window (like in Windows and most Linux apps).
I hope this helps. -------------------------------------------------------------------------------------- An Apple a day keeps Microsoft away
Second Lt. Applemeister of the 68k Macintosh Liberation Army
On 11 Feb 2008, at 05:25, Alexei Svitkine wrote: Has anyone ever implemented a preferences Swing component that mimics closely the prefs windows expected in Aqua apps?
Is there such a component freely available for use somewhere? Or does everyone roll their own?
-Alexei Svitkine
_______________________________________________ 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
_______________________________________________ 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
_______________________________________________ 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
|