Home > DeveloperSection > Forums > GWT(Google Web Toolkit)
Manasavi Rajpoot
Manasavi Rajpoot

Total Post:10

Points:70
Posted on    November-26-2010 1:08 AM

 Java Java 
Ratings:


 1 Reply(s)
 1398  View(s)
Rate this:
how use the GWT in java
give the example of its
thanks in advance.



Amit Singh

Total Post:103

Points:721
Posted on    November-26-2010 1:25 AM

Google Web Toolkit (GWT) is an open source Java development framework that lets you escape the matrix of technologies that make writing AJAX applications so difficult and error prone. With GWT, you can develop and debug AJAX applications in the Java language using the Java development tools of your choice. When you deploy your application to production, the GWT compiler translates your Java application to browser-compliant JavaScript and HTML.

Sample:

public class Slicr implements EntryPoint {

public void onModuleLoad() {
final Button button = new Button("Click me");
final Label label = new Label();
button.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
if (label.getText().equals(""))
label.setText("Hello World!");
else
label.setText("");
}
});
RootPanel.get("slot1").add(button);
RootPanel.get("slot2").add(label);
}
}

Don't want to miss updates? Please click the below button!

Follow MindStick