Mailing Lists: Apple Mailing Lists

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

Re: Aqua-style Box in Swing



Yes that works perfectly.

        IBGroupBoxPanel box = new IBGroupBoxPanel();
        box.setBorder(new TitledGroupBoxBorder("Hello"));
        box.add(new JLabel("Hey");

You need to include the nib4j.jar with your code. Unfortunately, while free for education, this is commercial code. There doesn't seem to be any source.

I think this can be replicated pretty easily though. You just need a JPanel with the appropriate background, and you need to create an appropriate Border. It can be based on TitledBorder for instance. Implement a paintBorder which draws a rounded rect, play with some insets, and it should be done. If I do it, I'll post the code.

I've also contacted the developer to see if he's willing to share.

J

On 17-Dec-04, at 2:03 AM, Manuel Hermann wrote:

Does anyone know how to get an Aqua-style Box in Swing? This is the Box
UI element as seen in Interface Builder.

You may try out nib4j. As you can see on the screen shot, it supports group
boxes with the typical Mac OS 10.3 style.


http://www.nib4j.com

Manuel



--
Julian Wood <email@hidden>

Programmer/Analyst
University of Calgary

http://commons.ucalgary.ca

_______________________________________________
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
References: 
 >Re:Aqua-style Box in Swing (From: Manuel Hermann <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.