google-code-export / macwidgets

Automatically exported from code.google.com/p/macwidgets
1 stars 0 forks source link

Create 'groupbox' #88

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Some people call this a groupbox, it groups widgets in little box, like this
http://macinmind.com/Help/Passenger/Help/pgs/gfx/concatbuttons.png

I worked around this by making my own rounded border, and settings it as the 
border for a 
TitledBorder. It's just a plain and simple rounded border though, no fancy 
shadows and all. I 
suggest subclassing AbstractBorder and writing your own, without using 
TitledBorder, unless it's 
possible to use TitledBorder, of course.

you'll think of something - thanks.

Lars

Original issue reported on code.google.com by Nephir...@gmail.com on 22 May 2009 at 1:42

GoogleCodeExporter commented 9 years ago
I just realized, however, that this might not be Apple's standard UI for these 
kinds of things, that picture looks 
like Tiger. I took this from my settings MobileMe panel
http://img40.imageshack.us/img40/6059/31364440.jpg
This does not have a header though, maybe it'd be cool to make that optional.

Original comment by Nephir...@gmail.com on 22 May 2009 at 1:47

GoogleCodeExporter commented 9 years ago
I'll think about this, but it may be better to submit an enhancement request to 
Apple instead, and have this 
directly supported by them.

http://developer.apple.com/BugReporter/

Original comment by kenneth....@gmail.com on 24 May 2009 at 11:24

GoogleCodeExporter commented 9 years ago
You can use a TitledBorder with the Quaqua Look & Feel
(http://www.randelshofer.ch/quaqua/), which will result in a box like above.

Original comment by jannikov...@gmail.com on 3 Jun 2009 at 12:25

GoogleCodeExporter commented 9 years ago
I actually found the solution, and it's simpler than I thought it would be...I 
never knew this variant existed, but it 
works on my Mac (Leopard, Java 1.6)

Border border = UIManager.getBorder("TitledBorder.aquaVariant");
if (border == null) border = BorderFactory.createEtchedBorder();
BorderFactory.createTitledBorder(border, "Hello");

Original comment by Nephir...@gmail.com on 6 Jun 2009 at 1:24

GoogleCodeExporter commented 9 years ago
Nice. I'm going to close this issue.

Original comment by kenneth....@gmail.com on 6 Jun 2009 at 2:02