dr_tectonic: (Default)
[personal profile] dr_tectonic
I've said it before, but allow me to reiterate my position: if you have ever had anything to do with the development of the Swing windowing library for Java, you had best not let me know about it, because there's a beating with your name on it waiting for you...

Date: 2004-11-17 10:27 am (UTC)
navrins: (serenity)
From: [personal profile] navrins
Really? What problems are you having? I didn't have anything to do with developing it, and it's certainly not perfect, but I've used it for a project and liked it a lot.

Date: 2004-11-17 10:57 am (UTC)
From: [identity profile] dr-tectonic.livejournal.com
Oh, it starts to do lots of stupid, STUPID things once your layout gets complex. We have a panel inside a tab. On the panel are several smaller panels ("summary views" of the proposals that the user is rank-ordering by clicking buttons up in the top part of the panel). Sometimes this set of summaries gets too long, so we want to put them in a JScrollPane. BUT, if you do that, the whole panel shoves itself past the left edge of the tab by about a centimeter. (This is my particular beef at the moment.)

Boxes are supposed to be generic containers for JComponents, but if you have a Box that contains both other Boxes and non-Boxes, it won't lay out properly. You have to wrap everything in a Box, or nothing.

You can't specify a required size of a component -- only the preferred size. And you can't specify just one dimension, you must specify both width and height, or specify neither.

A vertical strut has zero width -- unless it's the only thing in its container, in which case it DOES have a width. And adding "glue" (which expands to fill the available space) to a container does nothing, because containers always shrink-wrap to their contents, so you have to add a strut as well to make it fill up the space.

It's just so god-awful painful to make things line up properly that it makes me want to tear my hair out.

Date: 2004-11-17 10:46 am (UTC)
From: [identity profile] kung-fu-monkey.livejournal.com
Hey! NO BEATINGS ALLOWED (unless I'm in on it!)