Home » GWT FlowPanel

GWT FlowPanel

GWT FlowPanel is a simplest panel as it changes the format of child widgets using default HTML layout. In Flow Panel, no modification is done as HTMP element i.e. HTML div attaches itself to children directly.

GWT FlowPanel class declaration

Let’s see the declaration for com.google.gwt.user.client.ui.FlowPanel

GWTFlowTable Constructors

The followig table contains constructors for the GWT FlowPanel.

Constructors Description
FlowPanel() It is a constructor for empty FlowTable.
FlowPanel(java.lang.String tag) It creates an empty flow panel with a custom tag.

GWT FlowPanel methods

Modifier and Types Method Description
void add(Widget w) It adds a new child widget to the panel.
void clear() It removes all child widgets.
void insert(Iswidget w, int beforeIndex) It adds a widget before a specified index.

GWT FlowPanel Example 1

//SampleFlowPanel1.java

Output:

GWT FlowPanel

GWT FlowPanel Example 2

//SampleFlowPanel2.java

//SampleFlowPanel2.css

Output:

GWT FlowPanel

Next TopicGWT HTMLPanel

You may also like