Separate names with a comma.
Discussion in 'Mac Programming' started by Alvinkiang, May 2, 2006.
ANyone kNows whether in java is there any thing Similar or can be used to replace Frameset(Html) ?
If you are building a swing app, look into using JSplitPane and JPanel
Here's a link to the gospel.
Java has a whole variety of Layout Managers that you can use to arrange components how you like.
In my opinion, they're all rubbish. There was a point back in the days of AWT, where a button on one OS isn't the same size as the button on another. Of course, you could just leave extra room and place everything by hand all the same -- this is how I always did it. Most Java apps have horrible interfaces that are clearly a result of being constrained by overly simplified Layout Managers. Now that we have Swing, there's even less point.
I'm in a very small minority, though. 99% of good Java developers (or more) would say I'm wrong.
Less point in what? You still need layout managers in Swing.
What about in the English version versus the French version, where one button is different size from the other? Layout managers are built to deal with this. It's true that you can make ugly designs using them. You can also make lovely UI with them if you have some experience doing it.
If you don't like Swing layout manager, the SWT layout engine closely mirrors Interface Builder's own layout engine.
BTW: if you think layout managers suck, try making a win32 gui that can handle different font / window sizes / dpi settings. Lotsa fun
But I still agree with you on one point: Swing UI can (and will) get ugly, if they are designed by someone who is not very intimate with the Swing (over?)use of Design Patterns. Just look at the source code, they are all there, all of them, I tell you, it's a very fine piece of (over)engineering...
So the perverse side effect is that, if you don't know each and every design choice, you end up using a subpart of swing and create a maintenance nightmare.
But if you are one of the few 'Gifted', you can create some wonderfully elegant and fast code. I met one such person, only once though...