EXT-GWT Question:
Download Job Interview Questions and Answers PDF
How to create custom widgets in GWT?
Answer:
Create a class that should extends Composite class of GWT.
Inside the constructor you can write you logic to create a widget and call the initWidget method().
Then you can use this class in anywhere in the application and add this widget in any panels.
private static class OptionalTextBox extends Composite implements
ClickHandler {
private TextBox textBox = new TextBox();
private CheckBox checkBox = new CheckBox();
--------
initWidget(panel);
-------
}
Inside the constructor you can write you logic to create a widget and call the initWidget method().
Then you can use this class in anywhere in the application and add this widget in any panels.
private static class OptionalTextBox extends Composite implements
ClickHandler {
private TextBox textBox = new TextBox();
private CheckBox checkBox = new CheckBox();
--------
initWidget(panel);
-------
}
Download EXT GWT Interview Questions And Answers
PDF
Previous Question | Next Question |
What are the GWT Panels? | Explain Code of entry point with onModuleLoad where split out is working? |