{"id":29,"date":"2011-05-30T22:14:13","date_gmt":"2011-05-30T22:14:13","guid":{"rendered":"http:\/\/choudhury.com\/blog\/?p=29"},"modified":"2011-06-14T22:44:38","modified_gmt":"2011-06-14T22:44:38","slug":"browser-component-in-javafx-beta2","status":"publish","type":"post","link":"https:\/\/choudhury.com\/blog\/2011\/05\/30\/browser-component-in-javafx-beta2\/","title":{"rendered":"Browser Component in JavaFX Beta2"},"content":{"rendered":"<p>Played with the JavaFX2 Beta SDK and was impressed with what they done with it so far! I was eager to see what acid3 score the webview component would get and this my result..<\/p>\n<p><a href=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/browser_acid3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-30\" title=\"javfx2_browser_acid3_score\" src=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/browser_acid3.png\" alt=\"\" width=\"686\" height=\"520\" srcset=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/browser_acid3.png 686w, https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2011\/05\/browser_acid3-300x227.png 300w\" sizes=\"auto, (max-width: 686px) 100vw, 686px\" \/><\/a><\/p>\n<p>That&#8217;s cool. (In swing we are just limited to html 3.2! )<\/p>\n<p>The code for the above I took from this blog (shows how to embed javafx controls inside Swing)<\/p>\n<p><a href=\"http:\/\/a1o1.posterous.com\/java-fx20-embedding-webview-in-swing\">http:\/\/a1o1.posterous.com\/java-fx20-embedding-webview-in-swing<\/a><\/p>\n<p>But made the following change&#8230; (guessing the API must have changed slightly for the beta sdk)<\/p>\n<p><span style=\"color: #ff0000;\"><del>Sequence&lt;Node&gt; children = root.getChildren(); <\/del><\/span><br \/>\n<span style=\"color: #ff0000;\"><del>children.add(browser);<\/del><\/span><\/p>\n<div class=\"codecolorer-container java default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"java codecolorer\">ObservableList<span class=\"sy0\">&lt;<\/span>Node<span class=\"sy0\">&gt;<\/span> children <span class=\"sy0\">=<\/span> root.<span class=\"me1\">getChildren<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\nchildren.<span class=\"me1\">add<\/span><span class=\"br0\">&#40;<\/span>browser<span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><\/div><\/div>\n<p>I guess, now that we have this Webcomponent in JavaFX2, this RFE (<a href=\"http:\/\/bugs.sun.com\/bugdatabase\/view_bug.do?bug_id=4296022\">http:\/\/bugs.sun.com\/bugdatabase\/view_bug.do?bug_id=4296022<\/a>)\u00a0 will never the see the light of day! \ud83d\ude42<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Played with the JavaFX2 Beta SDK and was impressed with what they done with it so far! I was eager to see what acid3 score the webview component would get and this my result.. That&#8217;s cool. (In swing we are just limited to html 3.2! ) The code for the above I took from this &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/choudhury.com\/blog\/2011\/05\/30\/browser-component-in-javafx-beta2\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Browser Component in JavaFX Beta2&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-29","post","type-post","status-publish","format-standard","hentry","category-javafx"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/posts\/29","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/comments?post=29"}],"version-history":[{"count":11,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/posts\/29\/revisions"}],"predecessor-version":[{"id":35,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/posts\/29\/revisions\/35"}],"wp:attachment":[{"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/media?parent=29"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/categories?post=29"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/tags?post=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}