{"id":40007,"date":"2016-08-09T15:00:08","date_gmt":"2016-08-09T12:00:08","guid":{"rendered":"http:\/\/examples.javacodegeeks.com\/?p=40007"},"modified":"2019-04-09T12:55:45","modified_gmt":"2019-04-09T09:55:45","slug":"vaadin-jquery-example","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/","title":{"rendered":"Vaadin jQuery example"},"content":{"rendered":"<p>jQuery is a cross-platform JavaScript library designed to simplify the DOM manipulation. jQuery is the most popular JavaScript library in use today.<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;\n<\/p>\n<div class=\"toc\">\n<h3>Table Of Contents<\/h3>\n<dl>\n<dt><a href=\"#toc100\">1. The tools<\/a><\/dt>\n<dt><a href=\"#toc200\">2. Introduction<\/a><\/dt>\n<dt><a href=\"#toc300\">3. Prerequisites<\/a><\/dt>\n<dt><a href=\"#toc400\">4. Set up the project<\/a><\/dt>\n<dt><a href=\"#toc500\">5. Coding the example<\/a><\/dt>\n<dd>\n<dl>\n<dt><a href=\"#toc510\">5.1 jQuery<\/a><\/dt>\n<dd>\n<dl>\n<dt><a href=\"#toc511\">5.1.1 Download jQuery<\/a><\/dt>\n<dt><a href=\"#toc512\">5.1.2 Include jQuery in the Vaadin project<\/a><\/dt>\n<dt><a href=\"#toc513\">5.1.3 Import jQuery in the Vaadin project<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dt><a href=\"#toc520\">5.2 Styles<\/a><\/dt>\n<dt><a href=\"#toc530\">5.3 Java Code<\/a><\/dt>\n<dd>\n<dl>\n<dt><a href=\"#toc531\">5.3.1 Main Layout<\/a><\/dt>\n<dt><a href=\"#toc532\">5.3.2 Buttons Layout<\/a><\/dt>\n<dt><a href=\"#toc533\">5.3.3 The Label<\/a><\/dt>\n<dt><a href=\"#toc534\">5.3.4 Change background color button<\/a><\/dt>\n<dt><a href=\"#toc535\">5.3.5 Change Opacity button<\/a><\/dt>\n<dt><a href=\"#toc536\">5.3.6 Change width button<\/a><\/dt>\n<dt><a href=\"#toc537\">5.3.7 Animate Button<\/a><\/dt>\n<dt><a href=\"#toc538\">5.3.8 Change text button<\/a><\/dt>\n<dt><a href=\"#toc539\">5.3.9 Change html text button<\/a><\/dt>\n<dt><a href=\"#toc5310\">5.3.10 Center text button<\/a><\/dt>\n<dt><a href=\"#toc5311\">5.3.11 Justify text left button<\/a><\/dt>\n<dt><a href=\"#toc5312\">5.3.12 Add widgets to layout<\/a><\/dt>\n<\/dl>\n<\/dd>\n<\/dl>\n<\/dd>\n<dt><a href=\"#toc600\">6. The complete source code<\/a><\/dt>\n<dd>\n<dl>\n<dt><a href=\"#toc610\">6.1 Styles<\/a><\/dt>\n<dt><a href=\"#toc620\">6.2 Main Class<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dt><a href=\"#toc700\">7. Running the example<\/a><\/dt>\n<dt><a href=\"#toc800\">8. Results<\/a><\/dt>\n<dd>\n<dl>\n<dt><a href=\"#toc810\">8.1 Start application<\/a><\/dt>\n<dt><a href=\"#toc820\">8.2 Change label color<\/a><\/dt>\n<dt><a href=\"#toc830\">8.3 Change label opacity<\/a><\/dt>\n<dt><a href=\"#toc840\">8.4 Change label width<\/a><\/dt>\n<dt><a href=\"#toc850\">8.5 Animate label<\/a><\/dt>\n<dt><a href=\"#toc860\">8.6 Change text<\/a><\/dt>\n<dt><a href=\"#toc870\">8.7 HTML text<\/a><\/dt>\n<dt><a href=\"#toc880\">8.8 Center text<\/a><\/dt>\n<dt><a href=\"#toc890\">8.9 Justify text left<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dt><a href=\"#toc900\">9. Download the Source Code<\/a><\/dt>\n<\/dl>\n<\/div>\n<h2><a name=\"toc100\"><\/a>1. The tools<\/h2>\n<ul>\n<li>Java JDK 8<\/li>\n<li>Latest Eclipse Mars<\/li>\n<li>Vaadin 7.6.8<\/li>\n<li>Tomcat Server 8<\/li>\n<\/ul>\n<h2><a name=\"toc200\"><\/a>2. Introduction<\/h2>\n<p>In this example we are going to use jQuery to manipulate some UI elements.&nbsp;jQuery works on the client side and when you use it, you don&#8217;t get the server calls that you usually get with the Vaadin widgets. Here we are going to create a label and manipulate the label with jQuery inside a Vaadin application.<\/p>\n<h2><a name=\"toc300\"><\/a>3. Prerequisites<\/h2>\n<ul>\n<li>JDK installed<\/li>\n<li>Eclipse Mars installed and working<\/li>\n<li>Vaadin plug-in installed<\/li>\n<li>Tomcat 8 installed and running<\/li>\n<\/ul>\n<h2><a name=\"toc400\"><\/a>4. Set up the project<\/h2>\n<p>In the file menu choose File -&gt; New -&gt; Other<\/p>\n<p><figure id=\"attachment_34378\" aria-describedby=\"caption-attachment-34378\" style=\"width: 646px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/01-New-Project-1.png\" rel=\"attachment wp-att-34378\"><img decoding=\"async\" class=\"size-full wp-image-34378\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/01-New-Project-1.png\" alt=\"01 New Project\" width=\"646\" height=\"422\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/01-New-Project-1.png 646w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/01-New-Project-1-300x196.png 300w\" sizes=\"(max-width: 646px) 100vw, 646px\" \/><\/a><figcaption id=\"caption-attachment-34378\" class=\"wp-caption-text\">1 New Project<\/figcaption><\/figure><\/p>\n<p>Now from the list choose Vaadin 7 project<\/p>\n<p><figure id=\"attachment_34379\" aria-describedby=\"caption-attachment-34379\" style=\"width: 524px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/02-Vaadin-Project-1.png\" rel=\"attachment wp-att-34379\"><img decoding=\"async\" class=\"size-full wp-image-34379\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/02-Vaadin-Project-1.png\" alt=\"02 Vaadin Project\" width=\"524\" height=\"499\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/02-Vaadin-Project-1.png 524w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/02\/02-Vaadin-Project-1-300x286.png 300w\" sizes=\"(max-width: 524px) 100vw, 524px\" \/><\/a><figcaption id=\"caption-attachment-34379\" class=\"wp-caption-text\">2 Vaadin Project<\/figcaption><\/figure><\/p>\n<p>Click&nbsp;next and name your project then press finish.<\/p>\n<h2><a name=\"toc500\"><\/a>5. The example<\/h2>\n<h3><a name=\"toc510\"><\/a>5.1 jQuery<\/h3>\n<h4><a name=\"toc511\"><\/a>5.1.1 Download jQuery<\/h4>\n<p>Go to: <a href=\"https:\/\/jquery.com\/download\/\" target=\"_blank\" rel=\"noopener noreferrer\">Download jQuery<\/a>&nbsp;and download the latest jQuery.<\/p>\n<p><figure id=\"attachment_40009\" aria-describedby=\"caption-attachment-40009\" style=\"width: 701px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/3-Download-jQuery.png\"><img decoding=\"async\" class=\"size-full wp-image-40009\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/3-Download-jQuery.png\" alt=\"3 Download jQuery\" width=\"701\" height=\"369\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/3-Download-jQuery.png 701w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/3-Download-jQuery-300x158.png 300w\" sizes=\"(max-width: 701px) 100vw, 701px\" \/><\/a><figcaption id=\"caption-attachment-40009\" class=\"wp-caption-text\">3 Download jQuery<\/figcaption><\/figure><\/p>\n<h4><a name=\"toc512\"><\/a>5.1.2 Include jQuery in the Vaadin project<\/h4>\n<p>Place the downloaded library inside the Vaadin Project.&nbsp;In the folder:&nbsp;[PROJECT-NAME]-&gt;WebContent-&gt;VAADIN-&gt;jquery<\/p>\n<p><figure id=\"attachment_40010\" aria-describedby=\"caption-attachment-40010\" style=\"width: 409px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/4-jQuery-location.png\"><img decoding=\"async\" class=\"size-full wp-image-40010\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/4-jQuery-location.png\" alt=\"4 jQuery location\" width=\"409\" height=\"493\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/4-jQuery-location.png 409w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/4-jQuery-location-249x300.png 249w\" sizes=\"(max-width: 409px) 100vw, 409px\" \/><\/a><figcaption id=\"caption-attachment-40010\" class=\"wp-caption-text\">4 jQuery location<\/figcaption><\/figure><\/p>\n<h4><a name=\"toc513\"><\/a>5.1.3 Import jQuery in the Vaadin project<\/h4>\n<p>Import the jQuery library using the annotation <code>@JavaScript<\/code><\/p>\n<p><span style=\"text-decoration: underline;\"><em>Import jQuery<\/em><\/span><\/p>\n<pre class=\"brush:java\">@JavaScript({\"vaadin:\/\/jquery\/jquery-3.1.0.min.js\"})\n<\/pre>\n<h3><a name=\"toc520\"><\/a>5.2 Styles<\/h3>\n<p>Edit the styles file and add a style for the label.<\/p>\n<p>[PROJECT-NAME]-&gt;WebContent-&gt;VAADIN-&gt;themes-&gt;[project-name]-&gt;[projectname].scss<\/p>\n<p><figure id=\"attachment_40011\" aria-describedby=\"caption-attachment-40011\" style=\"width: 442px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/5-Styles.png\"><img decoding=\"async\" class=\"size-full wp-image-40011\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/5-Styles.png\" alt=\"5 Styles\" width=\"442\" height=\"544\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/5-Styles.png 442w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/5-Styles-244x300.png 244w\" sizes=\"(max-width: 442px) 100vw, 442px\" \/><\/a><figcaption id=\"caption-attachment-40011\" class=\"wp-caption-text\">5 Styles<\/figcaption><\/figure><\/p>\n<p><span style=\"text-decoration: underline;\"><em>java<\/em><\/span><\/p>\n<pre class=\"brush:java\">.v-label-mylabelstyle {\n    color: black;\n    text-align: left;\n    background-color: lightblue;\n}\n<\/pre>\n<p><code>color: black;&nbsp;<\/code>Changes the color of the text to black.<br \/>\n<code>text-align: left;<\/code>Aligns the text to the left.<br \/>\n<code>background-color: lightblue.<\/code>Changes the background color to a light blue.<\/p>\n<h3><a name=\"toc530\"><\/a>5.3 Java Code<\/h3>\n<h4><a name=\"toc531\"><\/a>5.3.1 Main Layout<\/h4>\n<p><span style=\"text-decoration: underline;\"><em>Main Layout<\/em><\/span><\/p>\n<pre class=\"brush:java\">\t\tfinal VerticalLayout layout = new VerticalLayout();\n\t\tlayout.setMargin(true);\n\t\tlayout.setSpacing(true);\n\t\tsetContent(layout);\n<\/pre>\n<p><code>final VerticalLayout layout = new VerticalLayout();&nbsp;<\/code>Creates a vertical layout.<br \/>\n<code>layout.setMargin(true);&nbsp;<\/code>Enables the margin of the layout.<\/p>\n<p><code>layout.setSpacing(true);&nbsp;<\/code>Enables the spacing of the layout.<br \/>\n<code>setContent(layout);&nbsp;<\/code>Sets the main content to the vertical layout.<\/p>\n<h4><a name=\"toc532\"><\/a>5.3.2 Buttons Layout<\/h4>\n<p><span style=\"text-decoration: underline;\"><em>Buttons layouts<\/em><\/span><\/p>\n<pre class=\"brush:java\">\t\tHorizontalLayout buttonLayout1 =  new HorizontalLayout();\n\t\tHorizontalLayout buttonLayout2 =  new HorizontalLayout();\n<\/pre>\n<p><code>HorizontalLayout buttonLayout1 = new HorizontalLayout();&nbsp;<\/code>Creates an horizontal layout for the first row of buttons.<br \/>\n<code>HorizontalLayout buttonLayout2 = new HorizontalLayout();&nbsp;<\/code>Creates an horizontal layout for the second row of buttons.<\/p>\n<h4><a name=\"toc533\"><\/a>5.3.3 The Label<\/h4>\n<p><span style=\"text-decoration: underline;\"><em>The label<\/em><\/span><\/p>\n<pre class=\"brush:java\">\t\tLabel theLabel = new Label(\"This is a label\");\n\t\ttheLabel.setWidth(\"400px\");\n\t\ttheLabel.setHeight(\"50px\");\n\t\ttheLabel.setId(\"theLabel\");\n\t\ttheLabel.addStyleName(\"mylabelstyle\");\n<\/pre>\n<p><code>Label theLabel = new Label(\"This is a label\");&nbsp;<\/code>Creates a new label.<br \/>\n<code>theLabel.setWidth(\"400px\");&nbsp;<\/code>Sets the width of the label.<\/p>\n<p><code>theLabel.setHeight(\"50px\");&nbsp;<\/code>Sets the height of the label.<br \/>\n<code>theLabel.setId(\"theLabel\");&nbsp;<\/code>Assigns an id to the label.<\/p>\n<p><code>theLabel.addStyleName(\"mylabelstyle\");&nbsp;<\/code>Adds a style to the label.<\/p>\n<h4><a name=\"toc534\"><\/a>5.3.4 Change background color button<\/h4>\n<p><span style=\"text-decoration: underline;\"><em>Change background color button<\/em><\/span><\/p>\n<pre class=\"brush:java\">\t\tButton backgroundButton = new Button(\"Color\");\n\t\tbackgroundButton.setWidth(\"100px\");\n\t\tbackgroundButton.addClickListener(new ClickListener() {\n\t\t\t@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({width: '400px'});\");\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({opacity: 1.0}, 100);\");\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').css('background-color', 'green').css('color', 'white');\");\n\t\t\t}\n\t\t});\n<\/pre>\n<p><code>Button backgroundButton = new Button(\"Color\");<\/code> Creates a button to change the color.<br \/>\n<code>backgroundButton.setWidth(\"100px\");<\/code> Sets the width of the button.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p><code>backgroundButton.addClickListener(new ClickListener() {<\/code> Adds a click listener to the button.<br \/>\n<code>com.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({width: '400px'});\");<\/code> Executes the jQuery code.<\/p>\n<p>This jQuery code animates the width of the label to be 400 pixels.<br \/>\n<code>com.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({opacity: 1.0}, 100);\");<\/code> Animates the opacity of the label to be entirely opaque.<\/p>\n<p><code>com.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').css('background-color', 'green').css('color', 'white');\");<\/code> Changes the background color of the label using the CSS selector of jQuery.<\/p>\n<h4><a name=\"toc535\"><\/a>5.3.5 Change Opacity button<\/h4>\n<p><span style=\"text-decoration: underline;\"><em>Change Opacity button<\/em><\/span><\/p>\n<pre class=\"brush:java\">\t\tButton opacityButton = new Button(\"Opacity\");\n\t\topacityButton.setWidth(\"100px\");\n\t\topacityButton.addClickListener(new Button.ClickListener() {\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({width: '400px'});\");\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({height: '50px'});\");\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({opacity: 0.2}, 1500);\");\n\t\t\t}\n\t\t});\n<\/pre>\n<p><code>Button opacityButton = new Button(\"Opacity\");&nbsp;<\/code>Creates a new button to change the opacity.<br \/>\n<code>opacityButton.setWidth(\"100px\");&nbsp;<\/code>Sets the width of the button.<\/p>\n<p><code>com.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({width: '400px'});\");&nbsp;<\/code>Animates the width of the label using jQuery.<br \/>\n<code>com.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({height: '50px'});\");&nbsp;<\/code>Animates the height of the label using jQuery.<\/p>\n<p><code>com.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({opacity: 0.2}, 1500);\");&nbsp;<\/code>Animates the opacity of the label to be almost transparent.<\/p>\n<h4><a name=\"toc536\"><\/a>5.3.6 Change width button<\/h4>\n<p><span style=\"text-decoration: underline;\"><em>Change width button<\/em><\/span><\/p>\n<pre class=\"brush:java\">\t\tButton widthButton = new Button(\"Width\");\n\t\twidthButton.setWidth(\"100px\");\n\t\twidthButton.addClickListener(new ClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({opacity: 1.0}, 100);\");\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({width: '200px'});\");\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({height: '50px'});\");\n\t\t\t}\n\t\t});\n<\/pre>\n<p><code>Button widthButton = new Button(\"Width\");&nbsp;<\/code>Creates a button to change the width of the label.<br \/>\n<code>widthButton.setWidth(\"100px\");&nbsp;<\/code>Sets the width of the button.<\/p>\n<p><code>com.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({opacity: 1.0}, 100);\");&nbsp;<\/code>Sets the label opaque using jQuery.<br \/>\n<code>com.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({width: '200px'});\");&nbsp;<\/code>Animates the width of the label to be 200 pixels, using jQuery.<\/p>\n<p><code>com.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({height: '50px'});\");&nbsp;<\/code>This jQuery animates the height of the label.<\/p>\n<h4><a name=\"toc537\"><\/a>5.3.7 Animate Button<\/h4>\n<p><span style=\"text-decoration: underline;\"><em>Animate button<\/em><\/span><\/p>\n<pre class=\"brush:java\">\t\tButton animateButton = new Button(\"Animate\");\n\t\tanimateButton.setWidth(\"100px\");\n\t\tanimateButton.addClickListener(new ClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tStringBuilder sb = new StringBuilder(\"$('#theLabel').animate({\");\n\t\t\t\tsb.append(\"opacity: '0.5',\");\n\t\t\t\tsb.append(\"height: '150px',\");\n\t\t\t\tsb.append(\"width: '150px'\");\n\t\t\t\tsb.append(\"});\");\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(sb.toString());\n\t\t\t}\n\t\t});\n<\/pre>\n<p><code>Button animateButton = new Button(\"Animate\");&nbsp;<\/code>Creates a button to animate the label.<br \/>\n<code>animateButton.setWidth(\"100px\");&nbsp;<\/code>Sets the width of the button.<\/p>\n<p><code>StringBuilder sb = new StringBuilder(\"$('#theLabel').animate({\");&nbsp;<\/code>Creates a string builder to build the jQuery string.<br \/>\n<code>sb.append(\"opacity: '0.5',\");&nbsp;<\/code>Appends the opacity property of the animation.<\/p>\n<p><code>sb.append(\"height: '150px',\");&nbsp;<\/code>Appends the height property of the animation.<br \/>\n<code>sb.append(\"width: '150px'\");&nbsp;<\/code>Appends the width property of the animation.<\/p>\n<p><code>sb.append(\"});\");&nbsp;<\/code>Appends the controls characters to complete the jQuery string<br \/>\n<code>com.vaadin.ui.JavaScript.getCurrent().execute(sb.toString());&nbsp;<\/code>Executes the jQuery animation.<\/p>\n<h4><a name=\"toc538\"><\/a>5.3.8 Change text button<\/h4>\n<p><span style=\"text-decoration: underline;\"><em>Change text button<\/em><\/span><\/p>\n<pre class=\"brush:java\">\t\tButton changeTextButton = new Button(\"Text\");\n\t\tchangeTextButton.setWidth(\"100px\");\n\t\tchangeTextButton.addClickListener(new ClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').text('This is other text');\");\n\t\t\t}\n\t\t});\n<\/pre>\n<p><code>Button changeTextButton = new Button(\"Text\");&nbsp;<\/code>Creates a button to change the text of the label.<br \/>\n<code>changeTextButton.setWidth(\"100px\");&nbsp;<\/code>Sets the width of the button.<\/p>\n<p><code>com.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').text('This is other text');\");&nbsp;<\/code>Changes the texts of the label using jQuery.<\/p>\n<h4><a name=\"toc539\"><\/a>5.3.9 Change html text button<\/h4>\n<p><span style=\"text-decoration: underline;\"><em>Change html text button<\/em><\/span><\/p>\n<pre class=\"brush:java\">\t\tButton changeTextHtmlButton = new Button(\"Html\");\n\t\tchangeTextHtmlButton.setWidth(\"100px\");\n\t\tchangeTextHtmlButton.addClickListener(new ClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').html('<b>This is HTML Text<\/b>');\");\n\t\t\t}\n\t\t});\n<\/pre>\n<p><code>Button changeTextHtmlButton = new Button(\"Html\");&nbsp;<\/code>Creates a button to change the text in the label for HTML.<br \/>\n<code>changeTextHtmlButton.setWidth(\"100px\");&nbsp;<\/code>Sets the width of the button.<\/p>\n<p><code>com.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').html('<b>This is HTML Text<\/b>');\");<\/code><br \/>\nThis jQuery changes the text to be an HTML element, in this case <b>.<\/b><\/p>\n<h4><a name=\"toc5310\"><\/a>5.3.10 Center text button<\/h4>\n<p><span style=\"text-decoration: underline;\"><em>Center text button<\/em><\/span><\/p>\n<pre class=\"brush:java\">\t\tButton centerButton = new Button(\"Center\");\n\t\tcenterButton.setWidth(\"100px\");\n\t\tcenterButton.addClickListener(new ClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').css('text-align','center');\");\n\t\t\t}\n\t\t});\n<\/pre>\n<p><code>Button centerButton = new Button(\"Center\");&nbsp;<\/code>Creates a button to center the text.<br \/>\n<code>centerButton.setWidth(\"100px\");&nbsp;<\/code>Sets the width of the button.<\/p>\n<p><code>com.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').css('text-align','center');\");&nbsp;<\/code>Centers the text of the label using jQuery.<\/p>\n<h4><a name=\"toc5311\"><\/a>5.3.11 Justify text left button<\/h4>\n<p><span style=\"text-decoration: underline;\"><em>Justify text left button<\/em><\/span><\/p>\n<pre class=\"brush:java\">\t\tButton leftButton = new Button(\"Left\");\n\t\tleftButton.setWidth(\"100px\");\n\t\tleftButton.addClickListener(new ClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').css('text-align','left');\");\n\t\t\t}\n\t\t});\n<\/pre>\n<p><code>Button leftButton = new Button(\"Left\");&nbsp;<\/code>Creates a button to align the text in the label.<br \/>\n<code>leftButton.setWidth(\"100px\");&nbsp;<\/code>Sets the width of the button.<br \/>\n<code>com.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').css('text-align','left');\");&nbsp;<\/code>Aligns left, the text in the label using jQuery.<\/p>\n<h4><a name=\"toc5312\"><\/a>5.3.12 Add widgets to layout<\/h4>\n<p><span style=\"text-decoration: underline;\"><em>Add widgets to layout<\/em><\/span><\/p>\n<pre class=\"brush:java\">\t\tbuttonLayout1.addComponent(backgroundButton);\n\t\tbuttonLayout1.addComponent(opacityButton);\n\t\tbuttonLayout1.addComponent(widthButton);\n\t\tbuttonLayout1.addComponent(animateButton);\n\t\tbuttonLayout2.addComponent(changeTextButton);\n\t\tbuttonLayout2.addComponent(changeTextHtmlButton);\n\t\tbuttonLayout2.addComponent(centerButton);\n\t\tbuttonLayout2.addComponent(leftButton);\n\t\tlayout.addComponent(theLabel);\n\t\tlayout.addComponent(buttonLayout1);\n\t\tlayout.addComponent(buttonLayout2);\n<\/pre>\n<p><code>buttonLayout1.addComponent(backgroundButton);&nbsp;<\/code>Adds the change color button to the first button layout.<br \/>\n<code>buttonLayout1.addComponent(opacityButton);&nbsp;<\/code>Adds the change opacity button to the first button layout.[ulp id=&#8217;YBvYYzEYBUrADqmI&#8217;]<\/p>\n<p><code>buttonLayout1.addComponent(widthButton);&nbsp;<\/code>Adds the change width button to the first button layout.<br \/>\n<code>buttonLayout1.addComponent(animateButton);&nbsp;<\/code>Adds the animate button to the first button layout.<\/p>\n<p><code>buttonLayout2.addComponent(changeTextButton);&nbsp;<\/code>Adds the change text button to the second button layout.<br \/>\n<code>buttonLayout2.addComponent(changeTextHtmlButton);&nbsp;<\/code>Adds the change HTML button to the second layout.<\/p>\n<p><code>buttonLayout2.addComponent(centerButton);&nbsp;<\/code>Adds the center text to the second button layout.<br \/>\n<code>buttonLayout2.addComponent(leftButton);&nbsp;<\/code>Adds the align left text to the second button layout.<br \/>\n<code>layout.addComponent(theLabel);&nbsp;<\/code>Adds the label to the layout.<\/p>\n<p><code>layout.addComponent(buttonLayout1);&nbsp;<\/code>Adds the first button layout to the layout.<br \/>\n<code>layout.addComponent(buttonLayout2);&nbsp;<\/code>Adds the second button layout to the layout.<\/p>\n<h2><a name=\"toc600\"><\/a>6. The complete source code<\/h2>\n<h3><a name=\"toc610\"><\/a>6.1 Styles<\/h3>\n<p><span style=\"text-decoration: underline;\"><em>vaadinjquery.scss<\/em><\/span><\/p>\n<pre class=\"brush:java\">@import \"..\/valo\/valo.scss\";\n\n@mixin vaadinjquery {\n  @include valo;\n\n.v-label-mylabelstyle {\n    color: black;\n    text-align: left;\n    background-color: lightblue;\n}\n}\n<\/pre>\n<h3><a name=\"toc620\"><\/a>6.2 Main Class<\/h3>\n<p><span style=\"text-decoration: underline;\"><em>VaadinjqueryUI.java<\/em><\/span><\/p>\n<pre class=\"brush:java; wrap-lines:false\">package com.example.vaadinjquery;\n\nimport javax.servlet.annotation.WebServlet;\n\nimport com.vaadin.annotations.JavaScript;\nimport com.vaadin.annotations.Theme;\nimport com.vaadin.annotations.VaadinServletConfiguration;\nimport com.vaadin.server.VaadinRequest;\nimport com.vaadin.server.VaadinServlet;\nimport com.vaadin.ui.Button;\nimport com.vaadin.ui.Button.ClickEvent;\nimport com.vaadin.ui.Button.ClickListener;\nimport com.vaadin.ui.HorizontalLayout;\nimport com.vaadin.ui.Label;\nimport com.vaadin.ui.UI;\nimport com.vaadin.ui.VerticalLayout;\n\n@JavaScript({\"vaadin:\/\/jquery\/jquery-3.1.0.min.js\"})\n@SuppressWarnings(\"serial\")\n@Theme(\"vaadinjquery\")\npublic class VaadinjqueryUI extends UI {\n\n\t@WebServlet(value = \"\/*\", asyncSupported = true)\n\t@VaadinServletConfiguration(productionMode = false, ui = VaadinjqueryUI.class, widgetset = \"com.example.vaadinjquery.widgetset.VaadinjqueryWidgetset\")\n\tpublic static class Servlet extends VaadinServlet {\n\t}\n\n\t@Override\n\tprotected void init(VaadinRequest request) {\n\t\tfinal VerticalLayout layout = new VerticalLayout();\n\t\tlayout.setMargin(true);\n\t\tlayout.setSpacing(true);\n\t\tsetContent(layout);\n\t\t\n\t\tHorizontalLayout buttonLayout1 =  new HorizontalLayout();\n\t\tHorizontalLayout buttonLayout2 =  new HorizontalLayout();\n\n\t\tLabel theLabel = new Label(\"This is a label\");\n\t\ttheLabel.setWidth(\"400px\");\n\t\ttheLabel.setHeight(\"50px\");\n\t\ttheLabel.setId(\"theLabel\");\n\t\ttheLabel.addStyleName(\"mylabelstyle\");\n\n\t\tButton backgroundButton = new Button(\"Color\");\n\t\tbackgroundButton.setWidth(\"100px\");\n\t\tbackgroundButton.addClickListener(new ClickListener() {\n\t\t\t@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({width: '400px'});\");\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({opacity: 1.0}, 100);\");\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').css('background-color', 'green').css('color', 'white');\");\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton opacityButton = new Button(\"Opacity\");\n\t\topacityButton.setWidth(\"100px\");\n\t\topacityButton.addClickListener(new Button.ClickListener() {\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({width: '400px'});\");\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({height: '50px'});\");\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({opacity: 0.2}, 1500);\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton widthButton = new Button(\"Width\");\n\t\twidthButton.setWidth(\"100px\");\n\t\twidthButton.addClickListener(new ClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({opacity: 1.0}, 100);\");\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({width: '200px'});\");\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').animate({height: '50px'});\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton animateButton = new Button(\"Animate\");\n\t\tanimateButton.setWidth(\"100px\");\n\t\tanimateButton.addClickListener(new ClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tStringBuilder sb = new StringBuilder(\"$('#theLabel').animate({\");\n\t\t\t\tsb.append(\"opacity: '0.5',\");\n\t\t\t\tsb.append(\"height: '150px',\");\n\t\t\t\tsb.append(\"width: '150px'\");\n\t\t\t\tsb.append(\"});\");\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(sb.toString());\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton changeTextButton = new Button(\"Text\");\n\t\tchangeTextButton.setWidth(\"100px\");\n\t\tchangeTextButton.addClickListener(new ClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').text('This is other text');\");\n\t\t\t}\n\t\t});\n\n\t\tButton changeTextHtmlButton = new Button(\"Html\");\n\t\tchangeTextHtmlButton.setWidth(\"100px\");\n\t\tchangeTextHtmlButton.addClickListener(new ClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').html('<b>This is HTML Text<\/b>');\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton centerButton = new Button(\"Center\");\n\t\tcenterButton.setWidth(\"100px\");\n\t\tcenterButton.addClickListener(new ClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').css('text-align','center');\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton leftButton = new Button(\"Left\");\n\t\tleftButton.setWidth(\"100px\");\n\t\tleftButton.addClickListener(new ClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tcom.vaadin.ui.JavaScript.getCurrent().execute(\"$('#theLabel').css('text-align','left');\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tbuttonLayout1.addComponent(backgroundButton);\n\t\tbuttonLayout1.addComponent(opacityButton);\n\t\tbuttonLayout1.addComponent(widthButton);\n\t\tbuttonLayout1.addComponent(animateButton);\n\t\tbuttonLayout2.addComponent(changeTextButton);\n\t\tbuttonLayout2.addComponent(changeTextHtmlButton);\n\t\tbuttonLayout2.addComponent(centerButton);\n\t\tbuttonLayout2.addComponent(leftButton);\n\t\tlayout.addComponent(theLabel);\n\t\tlayout.addComponent(buttonLayout1);\n\t\tlayout.addComponent(buttonLayout2);\n\t}\n\n}\n<\/pre>\n<h2><a name=\"toc700\"><\/a>7. Running the example<\/h2>\n<p>Right click on the project folder and choose Run as -&gt; Run on server choose Tomcat 8 server and click finish.<\/p>\n<h2><a name=\"toc800\"><\/a>8. Results<\/h2>\n<h3><a name=\"toc810\"><\/a>8.1 Start application<\/h3>\n<p>When you start the application, you get the following screen.<\/p>\n<p><figure id=\"attachment_40012\" aria-describedby=\"caption-attachment-40012\" style=\"width: 478px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/6-Run-Application.png\"><img decoding=\"async\" class=\"size-full wp-image-40012\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/6-Run-Application.png\" alt=\"6 Run Application\" width=\"478\" height=\"314\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/6-Run-Application.png 478w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/6-Run-Application-300x197.png 300w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><\/a><figcaption id=\"caption-attachment-40012\" class=\"wp-caption-text\">6 Run Application<\/figcaption><\/figure><\/p>\n<h3><a name=\"toc820\"><\/a>8.2 Change label color<\/h3>\n<p>Change the label color to green.<\/p>\n<p><figure id=\"attachment_40013\" aria-describedby=\"caption-attachment-40013\" style=\"width: 460px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/7-Change-label-color.png\"><img decoding=\"async\" class=\"size-full wp-image-40013\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/7-Change-label-color.png\" alt=\"7 Change label color\" width=\"460\" height=\"282\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/7-Change-label-color.png 460w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/7-Change-label-color-300x184.png 300w\" sizes=\"(max-width: 460px) 100vw, 460px\" \/><\/a><figcaption id=\"caption-attachment-40013\" class=\"wp-caption-text\">7 Change label color<\/figcaption><\/figure><\/p>\n<h3><a name=\"toc830\"><\/a>8.3 Change label opacity<\/h3>\n<p>Change the label opacity.<\/p>\n<p><figure id=\"attachment_40014\" aria-describedby=\"caption-attachment-40014\" style=\"width: 456px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/8-Change-label-opacity.png\"><img decoding=\"async\" class=\"size-full wp-image-40014\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/8-Change-label-opacity.png\" alt=\"8 Change label opacity\" width=\"456\" height=\"277\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/8-Change-label-opacity.png 456w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/8-Change-label-opacity-300x182.png 300w\" sizes=\"(max-width: 456px) 100vw, 456px\" \/><\/a><figcaption id=\"caption-attachment-40014\" class=\"wp-caption-text\">8 Change label opacity<\/figcaption><\/figure><\/p>\n<h3><a name=\"toc840\"><\/a>8.4 Change label width<\/h3>\n<p>Change the label width.<\/p>\n<p><figure id=\"attachment_40015\" aria-describedby=\"caption-attachment-40015\" style=\"width: 460px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/9-Change-label-width.png\"><img decoding=\"async\" class=\"size-full wp-image-40015\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/9-Change-label-width.png\" alt=\"9 Change label width\" width=\"460\" height=\"272\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/9-Change-label-width.png 460w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/9-Change-label-width-300x177.png 300w\" sizes=\"(max-width: 460px) 100vw, 460px\" \/><\/a><figcaption id=\"caption-attachment-40015\" class=\"wp-caption-text\">9 Change label width<\/figcaption><\/figure><\/p>\n<h3><a name=\"toc850\"><\/a>8.5 Animate label<\/h3>\n<p>Animate the label.<\/p>\n<p><figure id=\"attachment_40016\" aria-describedby=\"caption-attachment-40016\" style=\"width: 458px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/10-Animate-label.png\"><img decoding=\"async\" class=\"size-full wp-image-40016\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/10-Animate-label.png\" alt=\"10 Animate label\" width=\"458\" height=\"378\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/10-Animate-label.png 458w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/10-Animate-label-300x248.png 300w\" sizes=\"(max-width: 458px) 100vw, 458px\" \/><\/a><figcaption id=\"caption-attachment-40016\" class=\"wp-caption-text\">10 Animate label<\/figcaption><\/figure><\/p>\n<h3><a name=\"toc860\"><\/a>8.6 Change text<\/h3>\n<p>Change the text inside the label.<\/p>\n<p><figure id=\"attachment_40017\" aria-describedby=\"caption-attachment-40017\" style=\"width: 469px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/11-Change-Text.png\"><img decoding=\"async\" class=\"size-full wp-image-40017\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/11-Change-Text.png\" alt=\"11 Change Text\" width=\"469\" height=\"284\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/11-Change-Text.png 469w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/11-Change-Text-300x182.png 300w\" sizes=\"(max-width: 469px) 100vw, 469px\" \/><\/a><figcaption id=\"caption-attachment-40017\" class=\"wp-caption-text\">11 Change Text<\/figcaption><\/figure><\/p>\n<h3><a name=\"toc870\"><\/a>8.7 HTML text<\/h3>\n<p>Change the text in the label for HTML text.<\/p>\n<p><figure id=\"attachment_40018\" aria-describedby=\"caption-attachment-40018\" style=\"width: 461px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/12-HTML-text.png\"><img decoding=\"async\" class=\"size-full wp-image-40018\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/12-HTML-text.png\" alt=\"12 HTML text\" width=\"461\" height=\"286\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/12-HTML-text.png 461w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/12-HTML-text-300x186.png 300w\" sizes=\"(max-width: 461px) 100vw, 461px\" \/><\/a><figcaption id=\"caption-attachment-40018\" class=\"wp-caption-text\">12 HTML text<\/figcaption><\/figure><\/p>\n<h3><a name=\"toc880\"><\/a>8.8 Center text<\/h3>\n<p>Center the text in the label.<\/p>\n<p><figure id=\"attachment_40019\" aria-describedby=\"caption-attachment-40019\" style=\"width: 460px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/13-Center-text.png\"><img decoding=\"async\" class=\"size-full wp-image-40019\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/13-Center-text.png\" alt=\"13 Center text\" width=\"460\" height=\"275\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/13-Center-text.png 460w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/13-Center-text-300x179.png 300w\" sizes=\"(max-width: 460px) 100vw, 460px\" \/><\/a><figcaption id=\"caption-attachment-40019\" class=\"wp-caption-text\">13 Center text<\/figcaption><\/figure><\/p>\n<h3><a name=\"toc890\"><\/a>8.9 Justify text left<\/h3>\n<p>Justify the text.<\/p>\n<p><figure id=\"attachment_40020\" aria-describedby=\"caption-attachment-40020\" style=\"width: 459px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/14-Justify-text-left.png\"><img decoding=\"async\" class=\"size-full wp-image-40020\" src=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/14-Justify-text-left.png\" alt=\"14 Justify text left\" width=\"459\" height=\"281\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/14-Justify-text-left.png 459w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/14-Justify-text-left-300x184.png 300w\" sizes=\"(max-width: 459px) 100vw, 459px\" \/><\/a><figcaption id=\"caption-attachment-40020\" class=\"wp-caption-text\">14 Justify text left<\/figcaption><\/figure><\/p>\n<h2><a name=\"toc900\"><\/a>9. Download the Source Code<\/h2>\n<p>This was an example of: Vaadin jQuery.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the Eclipse project here:&nbsp;<strong><a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/08\/VaadinJquery.zip\">VaadinJquery<\/a><br \/>\n<\/strong><\/div>\n","protected":false},"excerpt":{"rendered":"<p>jQuery is a cross-platform JavaScript library designed to simplify the DOM manipulation. jQuery is the most popular JavaScript library in use today. &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Table Of Contents 1. The tools 2. Introduction 3. Prerequisites 4. Set up the project 5. Coding the example 5.1 jQuery 5.1.1 Download &hellip;<\/p>\n","protected":false},"author":77,"featured_media":33079,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1358],"tags":[1265],"class_list":["post-40007","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vaadin","tag-vaadin"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Vaadin jQuery example - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"jQuery is a cross-platform JavaScript library designed to simplify the DOM manipulation. jQuery is the most popular JavaScript library in use today.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Vaadin jQuery example - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"jQuery is a cross-platform JavaScript library designed to simplify the DOM manipulation. jQuery is the most popular JavaScript library in use today.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2016-08-09T12:00:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-04-09T09:55:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-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=\"Jesus Boadas\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@jboadas\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jesus Boadas\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/\"},\"author\":{\"name\":\"Jesus Boadas\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/506f9c2b38156c7f94bba77757206dd7\"},\"headline\":\"Vaadin jQuery example\",\"datePublished\":\"2016-08-09T12:00:08+00:00\",\"dateModified\":\"2019-04-09T09:55:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/\"},\"wordCount\":1169,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg\",\"keywords\":[\"Vaadin\"],\"articleSection\":[\"Vaadin\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/\",\"name\":\"Vaadin jQuery example - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg\",\"datePublished\":\"2016-08-09T12:00:08+00:00\",\"dateModified\":\"2019-04-09T09:55:45+00:00\",\"description\":\"jQuery is a cross-platform JavaScript library designed to simplify the DOM manipulation. jQuery is the most popular JavaScript library in use today.\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java Development\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Vaadin\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/vaadin\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Vaadin jQuery example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/506f9c2b38156c7f94bba77757206dd7\",\"name\":\"Jesus Boadas\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/10\/Jesus-Boadas_avatar_1476120926-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/10\/Jesus-Boadas_avatar_1476120926-96x96.jpg\",\"caption\":\"Jesus Boadas\"},\"description\":\"I'm a self taught programmer, I began programming back in 1991 using an IBM A10 mainframe with Pascal an Assembler IBM 360\/70 emulator and Turbo C on a X86 PC, since that I work for the banking industry with emerging technologies like Fox Pro, Visual Fox Pro, Visual Basic, Visual C++, Borland C++, lately I moved out to the Airline industry, leading designing and programming in-house web applications with Flex, Actionscript, PHP, Python and Rails and in the last 7 years I focused all my work in Java, working on Linux servers using GlassFish, TomCat, Apache and MySql.\",\"sameAs\":[\"http:\/\/www.javacodegeeks.com\/\",\"https:\/\/ve.linkedin.com\/in\/jesus-boadas\",\"https:\/\/x.com\/jboadas\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/jesus-boadas\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Vaadin jQuery example - Java Code Geeks","description":"jQuery is a cross-platform JavaScript library designed to simplify the DOM manipulation. jQuery is the most popular JavaScript library in use today.","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:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/","og_locale":"en_US","og_type":"article","og_title":"Vaadin jQuery example - Java Code Geeks","og_description":"jQuery is a cross-platform JavaScript library designed to simplify the DOM manipulation. jQuery is the most popular JavaScript library in use today.","og_url":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2016-08-09T12:00:08+00:00","article_modified_time":"2019-04-09T09:55:45+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg","type":"image\/jpeg"}],"author":"Jesus Boadas","twitter_card":"summary_large_image","twitter_creator":"@jboadas","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Jesus Boadas","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/"},"author":{"name":"Jesus Boadas","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/506f9c2b38156c7f94bba77757206dd7"},"headline":"Vaadin jQuery example","datePublished":"2016-08-09T12:00:08+00:00","dateModified":"2019-04-09T09:55:45+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/"},"wordCount":1169,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg","keywords":["Vaadin"],"articleSection":["Vaadin"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/","url":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/","name":"Vaadin jQuery example - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg","datePublished":"2016-08-09T12:00:08+00:00","dateModified":"2019-04-09T09:55:45+00:00","description":"jQuery is a cross-platform JavaScript library designed to simplify the DOM manipulation. jQuery is the most popular JavaScript library in use today.","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/01\/vaadin-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/vaadin\/vaadin-jquery-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java Development","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/"},{"@type":"ListItem","position":4,"name":"Vaadin","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/vaadin\/"},{"@type":"ListItem","position":5,"name":"Vaadin jQuery example"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/506f9c2b38156c7f94bba77757206dd7","name":"Jesus Boadas","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/10\/Jesus-Boadas_avatar_1476120926-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2016\/10\/Jesus-Boadas_avatar_1476120926-96x96.jpg","caption":"Jesus Boadas"},"description":"I'm a self taught programmer, I began programming back in 1991 using an IBM A10 mainframe with Pascal an Assembler IBM 360\/70 emulator and Turbo C on a X86 PC, since that I work for the banking industry with emerging technologies like Fox Pro, Visual Fox Pro, Visual Basic, Visual C++, Borland C++, lately I moved out to the Airline industry, leading designing and programming in-house web applications with Flex, Actionscript, PHP, Python and Rails and in the last 7 years I focused all my work in Java, working on Linux servers using GlassFish, TomCat, Apache and MySql.","sameAs":["http:\/\/www.javacodegeeks.com\/","https:\/\/ve.linkedin.com\/in\/jesus-boadas","https:\/\/x.com\/jboadas"],"url":"https:\/\/examples.javacodegeeks.com\/author\/jesus-boadas\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/40007","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/77"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=40007"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/40007\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/33079"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=40007"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=40007"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=40007"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}