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



the gui for a Box is currently (as of the current version of the OS, anyway) the same as the gui for a tab pane, except of course that there are tabs on one edge. you could have a tab pane with only one tab and tell your friends it's a "labled box". i don't think you're allowed to have a tab panel with no tabs in it (which, i don't know, could somehow be overlaid with another panel with the contents of your box), but perhaps you could subclass JTabbedPane to allow that, or to somehow turn the components which implement the tabs to be transparent.

in fact, i could use that in my app. maybe i'll try that out. if i do, i'll put up some code.

peace
Nicholas

PS i didn't really understand how good the Java API docs were until today when i had to use the javadocs for another API and they were really poor. now i'm thankful.




On Dec 16, 2004, at 4:27 PM, Julian Wood wrote:

Amazingly, no sooner had I sent this than I searched java-dev and found that not only had the same question been asked before, but I had also posted an answer!

So I guess my question now is, has there been any further progress?

It seems CardLayout plus a semi-transparent JPanel plus some special borders would be the way to go.

J

On 16-Dec-04, at 2:18 PM, Julian Wood wrote:

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

I've tried a couple of quick longshots like grabbing the border from a JTabbedPane (which exhibits the desired look, save the tabs), and using that as the border for a JPanel ( but it's null anyway - the look is handled by AquaTabbedPaneUI), and trying a JTabbedPane without a tab title (but you still get a tab).

Anything out there? Of course, I will be falling back to using titled borders around a JPanel, but it would be cool if somebody has figured out how to do this.

Thanks,

J
--
Julian Wood <email@hidden>

Programmer/Analyst
University of Calgary


_______________________________________________ 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
References: 
 >Aqua-style Box in Swing (From: Julian Wood <email@hidden>)
 >Re: Aqua-style Box in Swing (From: Julian Wood <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.