{"id":692,"date":"2017-02-28T00:57:04","date_gmt":"2017-02-28T00:57:04","guid":{"rendered":"http:\/\/choudhury.com\/blog\/?p=692"},"modified":"2017-02-28T00:58:56","modified_gmt":"2017-02-28T00:58:56","slug":"javafx-draggable-tabs","status":"publish","type":"post","link":"https:\/\/choudhury.com\/blog\/2017\/02\/28\/javafx-draggable-tabs\/","title":{"rendered":"JavaFX Draggable Tabs"},"content":{"rendered":"<p>The TabPane in JavaFX unfortunately does not provide mouse dragging \/ re-ording out of the box which is quite fustrating as users are now accustomed to doing that in their Browsers whey have Tabbed Browsing switched on.<\/p>\n<p>There is a Jira Raised for this feature : <\/p>\n<p><a href=\"https:\/\/bugs.openjdk.java.net\/browse\/JDK-8092098\">https:\/\/bugs.openjdk.java.net\/browse\/JDK-8092098<\/a><\/p>\n<p>There Jira was targeted for Java 9, however Java 9 is now feature complete, so it&#8217;s likely Java 10 is the earliest we will see this being available.<\/p>\n<p>Available Solutions<\/p>\n<ol>\n<li> <a href=\"https:\/\/github.com\/sibvisions\/javafx.DndTabPane\">https:\/\/github.com\/sibvisions\/javafx.DndTabPane<\/a>\n<p>This implementation draws a nice marker line as you drag the tabs around.<\/p>\n<\/li>\n<li> <a href=\"http:\/\/berry120.blogspot.co.uk\/2014\/01\/draggable-and-detachable-tabs-in-javafx.html\">http:\/\/berry120.blogspot.co.uk\/2014\/01\/draggable-and-detachable-tabs-in-javafx.html<\/a><br \/>\nThis seems to be the simplest solution, its relatively easy to understand how it&#8217;s working  (it works both Java 8 and Java 9-ea b158), in addition to the draggable tabs feature, it&#8217;s also detaching (tabs can be dragged out of the window into their own window).<\/p>\n<p>There is a few things you have to observe if you want to use it, as detailed in his blog.<\/p>\n<\/li>\n<li> <a href=\"https:\/\/github.com\/xylo\/DraggableTabs\">https:\/\/github.com\/xylo\/DraggableTabs<\/a>\n<p>There is this project which seems to based on similar solution to  above, it&#8217;s more  polished, has some sample code under tests, it&#8217;s also published onto maven central<\/p>\n<\/li>\n<\/ol>\n<p><b> <\/b><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The TabPane in JavaFX unfortunately does not provide mouse dragging \/ re-ording out of the box which is quite fustrating as users are now accustomed to doing that in their Browsers whey have Tabbed Browsing switched on. There is a Jira Raised for this feature : https:\/\/bugs.openjdk.java.net\/browse\/JDK-8092098 There Jira was targeted for Java 9, however &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/choudhury.com\/blog\/2017\/02\/28\/javafx-draggable-tabs\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;JavaFX Draggable Tabs&#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":[1],"tags":[],"class_list":["post-692","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/posts\/692","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=692"}],"version-history":[{"count":16,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/posts\/692\/revisions"}],"predecessor-version":[{"id":708,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/posts\/692\/revisions\/708"}],"wp:attachment":[{"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/media?parent=692"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/categories?post=692"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/tags?post=692"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}