{"id":997,"date":"2012-03-19T11:32:00","date_gmt":"2012-03-19T11:32:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/gwt-custom-button-using-uibinder.html"},"modified":"2012-10-21T23:14:10","modified_gmt":"2012-10-21T23:14:10","slug":"gwt-custom-button-using-uibinder","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2012\/03\/gwt-custom-button-using-uibinder.html","title":{"rendered":"GWT Custom Button using UIBinder"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left\">Here\u2019s an example on how to create a custom button using UIBinder on GWT.<\/p>\n<div class=\"separator\" style=\"clear: both;text-align: center\"><a href=\"http:\/\/3.bp.blogspot.com\/-T_DD4BTWRKk\/T2Ywj-H6MjI\/AAAAAAAAAkY\/NMLlNwZ0QkU\/s1600\/gwtbutton.png\"><img decoding=\"async\" border=\"0\" height=\"195\" src=\"http:\/\/3.bp.blogspot.com\/-T_DD4BTWRKk\/T2Ywj-H6MjI\/AAAAAAAAAkY\/NMLlNwZ0QkU\/s320\/gwtbutton.png\" width=\"320\" \/><\/a><\/div>\n<pre class=\"brush: java; first-line: 1; pad-line-numbers: true;\">public class GwtUIBinderButton implements EntryPoint {\r\n\r\n public void onModuleLoad() {\r\n  Button button = new Button();\r\n  button.setText(\"Button\");\r\n  button.addClickHandler(new ClickHandler(){\r\n   @Override\r\n   public void onClick(ClickEvent event) {\r\n    Window.alert(\"Button clicked\");\r\n   }\r\n  });\r\n  RootPanel.get(\"container\").add(button);\r\n }\r\n}\r\n<\/pre>\n<pre class=\"brush: java; first-line: 1; pad-line-numbers: true;\">public class Button extends Composite implements HasText, HasClickHandlers, ClickHandler{\r\n\r\n private static ButtonUiBinder uiBinder = GWT.create(ButtonUiBinder.class);\r\n\r\n interface ButtonUiBinder extends UiBinder&lt;Widget, Button&gt; {\r\n }\r\n\r\n @UiField(provided=true)\r\n FocusPanel pane = new FocusPanel();\r\n\r\n @UiField(provided=true)\r\n Label label = new Label();\r\n\r\n public Button() {\r\n\r\n  pane.addClickHandler(this);\r\n\r\n  \r\n  initWidget(uiBinder.createAndBindUi(this));\r\n }\r\n\r\n @Override\r\n public HandlerRegistration addClickHandler(ClickHandler handler) {\r\n  return addHandler(handler, ClickEvent.getType());\r\n }\r\n\r\n @Override\r\n\r\n public void onClick(ClickEvent event) {\r\n\r\n   this.fireEvent(event);\r\n\r\n }\r\n\r\n @Override\r\n public String getText() {\r\n  return label.getText();\r\n }\r\n\r\n @Override\r\n public void setText(String text) {\r\n  label.setText(text);\r\n }\r\n\r\n}\r\n<\/pre>\n<pre class=\"brush: bash; first-line: 1; pad-line-numbers: true;\">&lt;!DOCTYPE ui:UiBinder SYSTEM \"http:\/\/dl.google.com\/gwt\/DTD\/xhtml.ent\"&gt;\r\n&lt;ui:UiBinder xmlns:ui=\"urn:ui:com.google.gwt.uibinder\"\r\n xmlns:g=\"urn:import:com.google.gwt.user.client.ui\"&gt;\r\n &lt;ui:style&gt;\r\n   .button{\r\n    background-color: #eeeeee;\r\n    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #cccccc));\r\n    background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);\r\n    background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);\r\n    background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);\r\n    background-image: -o-linear-gradient(top, #eeeeee, #cccccc);\r\n    background-image: linear-gradient(top, #eeeeee, #cccccc);\r\n    border: 1px solid #ccc;\r\n    border-bottom: 1px solid #bbb;\r\n    -webkit-border-radius: 3px;\r\n    -moz-border-radius: 3px;\r\n    -ms-border-radius: 3px;\r\n    -o-border-radius: 3px;\r\n    border-radius: 3px;\r\n    color: #333;\r\n    font: bold 11px \"Lucida Grande\", \"Lucida Sans Unicode\", \"Lucida Sans\", Geneva, Verdana, sans-serif;\r\n    line-height: 1;\r\n    padding: 0px 0;\r\n    text-align: center;\r\n    text-shadow: 0 1px 0 #eee;\r\n    width: 120px; \r\n   }\r\n   .button:hover{\r\n    background-color: #dddddd;\r\n    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #dddddd), color-stop(100%, #bbbbbb));\r\n    background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb);\r\n    background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb);\r\n    background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb);\r\n    background-image: -o-linear-gradient(top, #dddddd, #bbbbbb);\r\n    background-image: linear-gradient(top, #dddddd, #bbbbbb);\r\n    border: 1px solid #bbb;\r\n    border-bottom: 1px solid #999;\r\n    cursor: pointer;\r\n    text-shadow: 0 1px 0 #ddd;\r\n    }\r\n   .button:active{\r\n    border: 1px solid #aaa;\r\n    border-bottom: 1px solid #888;\r\n    -webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;\r\n    -moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;\r\n    box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; \r\n    }\r\n    .pane{\r\n    text-align: center;\r\n    }\r\n &lt;\/ui:style&gt;\r\n &lt;g:SimplePanel ui:field=\"pane\" styleName=\"{style.button}\"&gt;\r\n  &lt;g:Label ui:field=\"label\"&gt;&lt;\/g:Label&gt;\r\n &lt;\/g:SimplePanel&gt;\r\n&lt;\/ui:UiBinder&gt; \r\n<\/pre>\n<div class=\"separator\" style=\"clear: both;text-align: center\"><a href=\"http:\/\/3.bp.blogspot.com\/-qW_Y6xTSIVs\/T2Yw0cXm4PI\/AAAAAAAAAkg\/D-uYd8h6knQ\/s1600\/gwtbutton1.png\"><img decoding=\"async\" border=\"0\" height=\"172\" src=\"http:\/\/3.bp.blogspot.com\/-qW_Y6xTSIVs\/T2Yw0cXm4PI\/AAAAAAAAAkg\/D-uYd8h6knQ\/s320\/gwtbutton1.png\" width=\"320\" \/><\/a><\/div>\n<p>Adding an Image:<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\"brush: bash; first-line: 1; pad-line-numbers: true;\">&lt;g:SimplePanel ui:field=\"pane\" styleName=\"{style.button}\"&gt;\r\n  &lt;g:HTMLPanel&gt;\r\n   &lt;table align=\"center\"&gt;\r\n    &lt;tr&gt;\r\n     &lt;td&gt;\r\n      &lt;g:Image styleName=\"{style.pane}\" url=\"gwt-logo-42x42.png\"&gt;&lt;\/g:Image&gt;\r\n     &lt;\/td&gt;\r\n     &lt;td&gt;\r\n      &lt;g:Label ui:field=\"label\"&gt;&lt;\/g:Label&gt;\r\n     &lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n   &lt;\/table&gt;\r\n  &lt;\/g:HTMLPanel&gt;\r\n &lt;\/g:SimplePanel&gt;\r\n<\/pre>\n<div class=\"separator\" style=\"clear: both;text-align: center\"><a href=\"http:\/\/3.bp.blogspot.com\/--VI-U29TATQ\/T2YxAhpbJbI\/AAAAAAAAAko\/vT5B7nN4Tsk\/s1600\/gwtbutton2.png\"><img decoding=\"async\" border=\"0\" height=\"172\" src=\"http:\/\/3.bp.blogspot.com\/--VI-U29TATQ\/T2YxAhpbJbI\/AAAAAAAAAko\/vT5B7nN4Tsk\/s320\/gwtbutton2.png\" width=\"320\" \/><\/a><\/div>\n<p><a href=\"http:\/\/gwtuibinderbutton.appspot.com\/\"><img decoding=\"async\" alt=\"Click to view Demo\" border=\"0\" src=\"http:\/\/glyphsoft.files.wordpress.com\/2012\/03\/demo-small-jpg.gif?w=529\" \/><\/a><\/p>\n<div class=\"wpadvert\" style=\"margin-bottom: 10px;margin-left: auto;margin-right: auto;margin-top: 10px;padding-bottom: 5px;padding-left: 5px;padding-right: 5px;padding-top: 5px;text-align: left;width: 410px\"><\/div>\n<p><strong><i>Reference: <\/i><\/strong><a href=\"http:\/\/glyphsoft.wordpress.com\/2012\/03\/03\/gwt-custom-button-using-uibinder\/\">GWT Custom Button using UIBinder<\/a>&nbsp;from our <a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partner<\/a><span class=\"Apple-style-span\" style=\"line-height: 18px\"><b>&nbsp;<\/strong><span class=\"Apple-style-span\" style=\"font-family: inherit\">Mark Andro Silva<\/span><\/span>&nbsp;at the&nbsp;<a href=\"http:\/\/glyphsoft.wordpress.com\/\">GlyphSoft<\/a>&nbsp;blog.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Here\u2019s an example on how to create a custom button using UIBinder on GWT. public class GwtUIBinderButton implements EntryPoint { public void onModuleLoad() { Button button = new Button(); button.setText(&#8220;Button&#8221;); button.addClickHandler(new ClickHandler(){ @Override public void onClick(ClickEvent event) { Window.alert(&#8220;Button clicked&#8221;); } }); RootPanel.get(&#8220;container&#8221;).add(button); } } public class Button extends Composite implements HasText, HasClickHandlers, ClickHandler{ private &hellip;<\/p>\n","protected":false},"author":187,"featured_media":125,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[27,404],"class_list":["post-997","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-google-gwt","tag-gwt-uibinder"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>GWT Custom Button using UIBinder - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Here\u2019s an example on how to create a custom button using UIBinder on GWT. public class GwtUIBinderButton implements EntryPoint { public void\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2012\/03\/gwt-custom-button-using-uibinder.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"GWT Custom Button using UIBinder - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Here\u2019s an example on how to create a custom button using UIBinder on GWT. public class GwtUIBinderButton implements EntryPoint { public void\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2012\/03\/gwt-custom-button-using-uibinder.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2012-03-19T11:32:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-10-21T23:14:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/google-gwt-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Mark Anro Silva\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@http:\/\/twitter.com\/glyphsoft\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mark Anro Silva\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/gwt-custom-button-using-uibinder.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/gwt-custom-button-using-uibinder.html\"},\"author\":{\"name\":\"Mark Anro Silva\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/5171aa2367dc6db6f53c705c48792fc1\"},\"headline\":\"GWT Custom Button using UIBinder\",\"datePublished\":\"2012-03-19T11:32:00+00:00\",\"dateModified\":\"2012-10-21T23:14:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/gwt-custom-button-using-uibinder.html\"},\"wordCount\":45,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/gwt-custom-button-using-uibinder.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/google-gwt-logo.jpg\",\"keywords\":[\"Google GWT\",\"GWT UIBinder\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/gwt-custom-button-using-uibinder.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/gwt-custom-button-using-uibinder.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/gwt-custom-button-using-uibinder.html\",\"name\":\"GWT Custom Button using UIBinder - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/gwt-custom-button-using-uibinder.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/gwt-custom-button-using-uibinder.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/google-gwt-logo.jpg\",\"datePublished\":\"2012-03-19T11:32:00+00:00\",\"dateModified\":\"2012-10-21T23:14:10+00:00\",\"description\":\"Here\u2019s an example on how to create a custom button using UIBinder on GWT. public class GwtUIBinderButton implements EntryPoint { public void\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/gwt-custom-button-using-uibinder.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/gwt-custom-button-using-uibinder.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/gwt-custom-button-using-uibinder.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/google-gwt-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/google-gwt-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/03\\\/gwt-custom-button-using-uibinder.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"GWT Custom Button using UIBinder\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/5171aa2367dc6db6f53c705c48792fc1\",\"name\":\"Mark Anro Silva\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4f29e374362bae5f3dccebd46f46ff73d53cb5ff218dcd58c3cf557f76d2729a?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4f29e374362bae5f3dccebd46f46ff73d53cb5ff218dcd58c3cf557f76d2729a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4f29e374362bae5f3dccebd46f46ff73d53cb5ff218dcd58c3cf557f76d2729a?s=96&d=mm&r=g\",\"caption\":\"Mark Anro Silva\"},\"description\":\"Software Engineer | UI\\\/UX Engineer, Java, JavaFX, GWT and Scala.\",\"sameAs\":[\"http:\\\/\\\/glyphsoft.wordpress.com\\\/\",\"http:\\\/\\\/www.linkedin.com\\\/pub\\\/mark-anro-silva\\\/20\\\/769\\\/384\",\"https:\\\/\\\/x.com\\\/http:\\\/\\\/twitter.com\\\/glyphsoft\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Mark-Anro-Silva\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"GWT Custom Button using UIBinder - Java Code Geeks","description":"Here\u2019s an example on how to create a custom button using UIBinder on GWT. public class GwtUIBinderButton implements EntryPoint { public void","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2012\/03\/gwt-custom-button-using-uibinder.html","og_locale":"en_US","og_type":"article","og_title":"GWT Custom Button using UIBinder - Java Code Geeks","og_description":"Here\u2019s an example on how to create a custom button using UIBinder on GWT. public class GwtUIBinderButton implements EntryPoint { public void","og_url":"https:\/\/www.javacodegeeks.com\/2012\/03\/gwt-custom-button-using-uibinder.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2012-03-19T11:32:00+00:00","article_modified_time":"2012-10-21T23:14:10+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/google-gwt-logo.jpg","type":"image\/jpeg"}],"author":"Mark Anro Silva","twitter_card":"summary_large_image","twitter_creator":"@http:\/\/twitter.com\/glyphsoft","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Mark Anro Silva","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2012\/03\/gwt-custom-button-using-uibinder.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/03\/gwt-custom-button-using-uibinder.html"},"author":{"name":"Mark Anro Silva","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/5171aa2367dc6db6f53c705c48792fc1"},"headline":"GWT Custom Button using UIBinder","datePublished":"2012-03-19T11:32:00+00:00","dateModified":"2012-10-21T23:14:10+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/03\/gwt-custom-button-using-uibinder.html"},"wordCount":45,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/03\/gwt-custom-button-using-uibinder.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/google-gwt-logo.jpg","keywords":["Google GWT","GWT UIBinder"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2012\/03\/gwt-custom-button-using-uibinder.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2012\/03\/gwt-custom-button-using-uibinder.html","url":"https:\/\/www.javacodegeeks.com\/2012\/03\/gwt-custom-button-using-uibinder.html","name":"GWT Custom Button using UIBinder - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/03\/gwt-custom-button-using-uibinder.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/03\/gwt-custom-button-using-uibinder.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/google-gwt-logo.jpg","datePublished":"2012-03-19T11:32:00+00:00","dateModified":"2012-10-21T23:14:10+00:00","description":"Here\u2019s an example on how to create a custom button using UIBinder on GWT. public class GwtUIBinderButton implements EntryPoint { public void","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/03\/gwt-custom-button-using-uibinder.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2012\/03\/gwt-custom-button-using-uibinder.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2012\/03\/gwt-custom-button-using-uibinder.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/google-gwt-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/google-gwt-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2012\/03\/gwt-custom-button-using-uibinder.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"GWT Custom Button using UIBinder"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/5171aa2367dc6db6f53c705c48792fc1","name":"Mark Anro Silva","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4f29e374362bae5f3dccebd46f46ff73d53cb5ff218dcd58c3cf557f76d2729a?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4f29e374362bae5f3dccebd46f46ff73d53cb5ff218dcd58c3cf557f76d2729a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4f29e374362bae5f3dccebd46f46ff73d53cb5ff218dcd58c3cf557f76d2729a?s=96&d=mm&r=g","caption":"Mark Anro Silva"},"description":"Software Engineer | UI\/UX Engineer, Java, JavaFX, GWT and Scala.","sameAs":["http:\/\/glyphsoft.wordpress.com\/","http:\/\/www.linkedin.com\/pub\/mark-anro-silva\/20\/769\/384","https:\/\/x.com\/http:\/\/twitter.com\/glyphsoft"],"url":"https:\/\/www.javacodegeeks.com\/author\/Mark-Anro-Silva"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/997","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/187"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=997"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/997\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/125"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=997"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=997"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}