Gwt-ext is a powerful Web development control library based on Google Web Toolkit (GWT) and ExtJs. It is ideal for fast development of rich Internet applications in the pure Java language. This series of articles will detail the basic structure and features of Gwt-ext, and demonstrate the implementation of the technology through code examples. This article is the 2nd part of the series that will introduce the very important control pannel, which is the base container for many other controls.
Panel
A panel is a container that provides a specific set of features and structured components that make it easy for users to organize the application's graphical interface. A Panel can contain three parts of the header, tail, and content body, and it can be implemented in its header section. The Panel itself has an automatic stretching behavior and provides a number of tool buttons to help users build personalized functionality.
The user can initialize a Panel by using the following construction method and specify its caption and content.
Panel (java.lang.String title, java.lang.String html)
Alternatively, an empty construction method can be used to construct a panel object, and then the Panel's caption and its contents are set through the Settitle and sethtml methods of the panel.
public void Settitle (java.lang.String title) public
void sethtml (java.lang.String html)
As you can see from the Sethtml method name, the Panel will automatically parse the incoming content in HTML format and show it.
The Panel provides a scalable feature that hides the content body, displays only the title section of the panel, allows users to see the contents of multiple panel without sliding up and down the screen, and finds the contents of a different panel by heading. As shown in Figure 1.
Figure 1. The expansion function of the Panel