Do you think IIT Guwahati certified course can help you in your career?
No
Introduction
In this article, we’ve covered everything you need to know about GWT VerticalSplitPanel Widget. The VerticalSplitPanel widget simulates a panel with two widgets arranged in a single vertical column, and it lets the user alter the proportion of the height allotted to each widget on the fly. When required, scrollbars will be automatically added to widgets placed within a VerticalSplitterPanel.
GWT VerticalSplitPanel Widget is deprecated. Instead, use SplitLayoutPanel but be aware that it does not completely replace this class. It needs standards mode and works best with a RootLayoutPanel rather than a RootPanel.
GWT VerticalSplitPanel Class Declaration
Let's look at the declaration of com.google.gwt.user.client.ui.VerticalSplitPane.
@Deprecated
public final class VerticalSplitPanel extends Panel
Here’s a diagram that shows the levels of inheritance and all the classes from which VerticalSplitPanel is inherited:
GWT VerticalSplitPanel Widget Nested Classes
It is a specific implementation of HTMLTable.CellFormatter.
static interface VerticalSplitPanel.Resources
GWT VerticalSplitPanel Constructor
All of the constructor methods listed below are deprecated:
Step 6: Let's look at the Java file src/com.example/HelloWorld.java with the following contents to see how to use the GWT VerticalSplitPanel widget.
package com.tutorialspoint.client;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.CheckBox;
import com.google.gwt.user.client.ui.DecoratorPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.VerticalSplitPanel;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
public class HelloWorld implements EntryPoint {
public void onModuleLoad() {
// Create a Vertical Split Panel
VerticalSplitPanel verticalSplitPanel = new VerticalSplitPanel();
verticalSplitPanel.setSize("250px", "250px");
verticalSplitPanel.setSplitPosition("20%");
String randomText = "GWT VerticalSplitpanel Widget";
randomText+=randomText;
verticalSplitPanel.setBottomWidget(new HTML(randomText));
verticalSplitPanel.setTopWidget(new HTML(randomText));
DecoratorPanel decoratorPanel = new DecoratorPanel();
decoratorPanel.add(verticalSplitPanel);
// Add the widgets to the root panel.
RootPanel.get().add(decoratorPanel);
}
}
Output:
Frequently Asked Questions
What is GWT VerticalSplitPanel Widget?
The VerticalSplitPanel widget simulates a panel with two widgets arranged in a single vertical column, and it lets the user alter the proportion of the height allotted to each widget on the fly.
What are the advantages of GWT?
An open-source Java software development platform; Google Web Toolkit (GWT) makes it simple to create AJAX apps. You can use the Java development tools to create and debug AJAX apps with GWT.
What advantages does GWT offer?
If you are a Java programmer with knowledge of Swing or AWT, selecting GWT should be simple. Even if you lack experience in Java GUI development, the years spent working on server-side Java will be helpful when creating GWT applications.
How advantageous is learning GWT?
Many Google projects, both internal and external, are based on GWT, therefore Google will need to sustain the technology as long as they need to keep improving the front-end.
Does Google use still GWT?
Some of Google's products, including Blogger, AdWords, Flights, Wallet, Offers, Groups, and Inbox, are GWT-based.
Conclusion
In this article, we have discussed everything you need to know about GWT VerticalSplitPanel Widget. Here are more articles to the rescue: