PDA

View Full Version : Question.....(Java Prob)




Alvinkiang
May 2, 2006, 04:42 AM
ANyone kNows whether in java is there any thing Similar or can be used to replace Frameset(Html) ?



Palad1
May 2, 2006, 05:05 AM
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 (http://java.sun.com/docs/books/tutorial/uiswing/components/splitpane.html).

cheers

frood
May 2, 2006, 06:33 PM
Java has a whole variety of Layout Managers that you can use to arrange components how you like.

savar
May 2, 2006, 09:53 PM
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.

therevolution
May 2, 2006, 11:14 PM
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.
Less point in what? You still need layout managers in Swing.

frood
May 2, 2006, 11:17 PM
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.

Palad1
May 3, 2006, 02:49 AM
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... :(