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 Spring in Action this week in the Spring 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: 10451
    
    8

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!]
 
jQuery in Action, 2nd edition
 
subject: Adding widgets to FlexTable