aspose file tools*
The moose likes GWT and the fly likes Adding widgets to FlexTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "Adding widgets to FlexTable" Watch "Adding widgets to FlexTable" New topic
Author

Adding widgets to FlexTable

Adi Vicks
Greenhorn

Joined: Feb 23, 2012
Posts: 9
I am newbie to GWT, so please take the question lightly

My goal is to create a FlexTable. Add widgets to it dynamically. but want to restrict number of widgets on a row to maximum 2 , and keep adding widgets dynamically. I want if a widget doesn't fit in a row
should get displayed on the next row automatically. I have widgets like text boxes with labels, combo boxes with labels , tab panels . Could anyone suggest any ideas ?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9990
    
    7

Welcome to the Ranch.

Check out the example in the API docs http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/FlexTable.html
The setWidget() method accepts a row, column and the widget.
Just run a simple loop to control the row,column indices


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Adding widgets to FlexTable
 
Similar Threads
dynamic width of 2 fields, 2nd field width = 1st field width
How to force HorizontalPanel to wrap
How to put a margin on flex tables
Dynamic generation and removal of form elements in struts1
Layout three GWT panels Horizontally