Wednesday, May 6, 2009

Vertical and horizontal flow panels in GWT

If you're anything like me, you probably hate the fact the the vertical and horizontal panels in GWT are implemented using tables. Not only does this make styling the resulting HTML pure hell, it also makes it unnecessarily complicated.

So here's something we can use for a pure div layout:



The source is also up at github.

The horizontal flow panel will, of course, wrap when there isn't any place left to go. But its a lot easier to style than the awful mess it throws up with tables.

6 comments:

defdac said...

This helped me alot when trying to make a SplitPanel 100% of the browser width. All I had to do was implementing your classes and put my SplitPanel with 100% width/height inside your VerticalFlowPanel.

Thanks so much for sharing!

Anonymous said...

Thanks! This really helped me a lot!

Sudhir Jonathan said...

Great :D

Tony said...

Fantastic, Sudhir. Extremely helpful!

NTDeaf said...

This looks really useful! Thx!

Anonymous said...

This totally worked for me. Great post. Thank you so much.

Sammx