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: NSBox subclassing JTabbedPane



KlunkyRobot <email@hidden> wrote:

>I did a search and cannot find how to do a NSBox in pure Java. the standard
>borders fall short. Has anyone been able to replicate this GUI element?
>
>Since a NSBox and a JTabbedPane visually are much the same just without the
>tab could I subclass the JTabbedPane to not show the tabs?

It would appear to be more tractable to create a custom Border. Doing so
would mean that you only have to figure out how to draw a rounded
rectangular border with some shading. Subclassing JTabbedPane and trying
to eliminate its tabs would be a far more complex undertaking, since the
first thing you'd have to do is figure out exactly what the Aqua TabbedPane
UI is doing.

With a rounded shadowed Border working, you could combine it with a
TitleBorder and a JPanel to create a single JComponent that also does the
internal shading of NSBox. You could call that class JBox.

-- GG
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.




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.