GWT Layout is quit strange for a programmer comming from swing desktop GUI dev. I know GWT Layout rely on browser layout engine which uses html and css to layout objects in browser window.
i'm writing a GWT application . but I run into a dilemma. if i use DockLayoutPanel which uses absolute positioning my Composites are not automatically resized to fit the size of it's children (i need this feature in my app). so i gave up using DockLayoutPanel and used HorizontalPanel and VerticalPanel. but HorizontalPanel doesn’t allow me to stack widgets beside each other then have last right most widgets fill all remaining horizontal space. when i add two panels to a HorizontalPanel i see they are layed out one on the east and one on the west (sse image below). If i use FlowPanel to add these two Panels they stack over each other. these are kinds of GWT UI oddities that i experienced. I want to layout many panels horizontally and want them to be aligned in the right by each other while the last Panel should fill all remaining available horizontal space. by simply adding Panels to a Parent HorizontalPanel i don't get my expected layout. below is a link of a screenshot for my three Panels Layed out by a parent HorizontalPanel. as you can see there is a Blank space separating Panels from each others. how we can work out to make them next to each other without the blank space? .
In fact I'm looking for advice on how to write this GWT Layout code elegantly perhaps using CSS without coding all Layout logic in java /GWT. can you propose some good solutions ?
Maneesh Godbole wrote:Instead of using panels, use a FlexTable instead. You can obtain a reference to the FlexCellFormatter to manipulate lots of attributes such as row/col span, v/hor alignment, width etc.
How would you code the editor UI in screeshot using FlexTable?
how to use Flextable to make three cells that fit height of their children widgets automatically. and also fits children widgets width automatically but last cell with TextArea would span to fill all remaining horizontal space.
can you give a hint how to do that with FlexTable?
using FlexTable is worse than vertical and Horizontal Panels.
I really tried to figure out how to layout these 3 Forms horizontally and having them resize h/v correctly but I'm stuck now! I have no clue what's ever how to do this Layout using standard GWT.
can someone help on this please?
The harder you work, the luckier you get. This tiny ad brings luck - just not good luck or bad luck.