DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Integrating PostgreSQL Databases with ANF: Join this workshop to learn how to create a PostgreSQL server using Instaclustr’s managed service

Mobile Database Essentials: Assess data needs, storage requirements, and more when leveraging databases for cloud and edge applications.

Monitoring and Observability for LLMs: Datadog and Google Cloud discuss how to achieve optimal AI model performance.

Automated Testing: The latest on architecture, TDD, and the benefits of AI and low-code tools.

Related

  • JavaFX Gets Video Capabilities
  • The Challenges of a JavaFX Reboot
  • Calling JavaFX From Java?
  • Wrapping Mule4 — Secure Properties with TornadoFx

Trending

  • Revolutionizing Software Testing
  • 16 K8s Worst Practices That Are Causing You Pain (Or Will Soon)
  • Vector Database: A Beginner's Guide
  • Researcher Finds GitHub Admin Credentials of Car Company Thanks to Misconfiguration
  1. DZone
  2. Coding
  3. Java
  4. FX Playground

FX Playground

Carl Dea user avatar by
Carl Dea
·
Jul. 21, 14 · Interview
Like (0)
Save
Tweet
Share
4.61K Views

Join the DZone community and get the full member experience.

Join For Free


logo5

introduction

f x playground is a javafx-based prototyping tool or live editor that eliminates the step of compiling java code. this concept isn’t new, for instance the web world there are many html5 playgrounds that offer online editors that enable developers to quickly prototype or experiment with various javascript libraries. this allows the developer to focus on visualizations or ui details without needing to set-up an ide project or mess with files. even older (pre-dating) than playgrounds are repls ( r ead e val p rint l oop) where dynamic languages such as groovy, python, ruby, etc. provide an interactive interpreter command line tool to allow developers to quickly script code to be executed. scala is a compiled language, but also provides a repl tool.

after finishing the book javafx 8 introduction by example i noticed each example was created as separate netbeans projects which seemed a little overkill for small examples. because the book is based on java the language each program needed to be compiled (via javac ) prior to execution. larger projects will typically need to be set-up with a proper classpath and resources in the appropriate directory locations. even larger projects will also need dependencies which typically reside on maven repositories.

javaone 2014

b ased on timing i was able to submit a talk regarding javafx based playgrounds just in time. after awhile i was pleasantly surprised that my proposal (talk) was accepted. you can check out the session . also, i will be presenting with my good friend gerrit grunwald ( @hansolo_ ). so, be prepared to see awe-inspiring demos. since the talk is a bof (birds of a feather) the atmosphere will be low-key and very casual. i hope to see you there!

the javaone talk is titled “javafx coding playground (javafx-based live editor tool) [bof2730]“.  based on the description you’ll find that the tool will be using the new! nashorn (javascript) engine to interact with javafx primitives. the figure below depicts the fx playground tool’s editor windows and a javafx display area. starting clockwise at the lower left is the code editor window allowing the user to use javascript (nashorn) to interact with nodes. next, is the javafx fxml editor window allowing the user to use fxml (upper left). the fxml window is an optional.  in the upper right, you will notice the javafx css editor window allowing you to style nodes on the display surface. lastly, to the bottom right is the output area or better known as the display_surface.

fxplayground's editor windows

fxplayground’s editor windows

fx playground in action

b ecause fx playground is still in development i will give you a glimpse of some demos that i’ve created on youtube. the following are examples with links to videos.

  • fxplayground3d - nashorn and javafx 3d
  • fx playground now has a settings slide out panel - nashorn, rectangle w/css, and mediaview
  • fx playground using enzo library - nashorn and enzo library
  • fx playground testing video w/ mediaview and webview - nashorn, mediaview and webview

roadmap

t here are plans to opensource the code, but for now there is much needed functionality before public consumption.

the following features are a work in progress:

  • make use of fxml editor window.
  • pop out the display panel into its own window
  • save, saveas, and load playgrounds
  • build software to be an executable for tool users. (90% done)
  • make the tool capable of using other languages (jsr 223)

i want to thank oracle corp. especially the following engineers who helped me (some of the engineers below are not oracle employees):

  • david grieve – @dsgrieve
  • jim laskey – @wickund
  • sundararajan athijegannathan  – @sundararajan_a
  • danno ferrin – @shemnon
  • sean phillips – @seanmiphillips
  • mark heckler – @mkheck
  • jose perada – @jperedadnr
  • gerrit grunwald – @hansolo_
  • jim weaver - @javafxpert

references

carlfx’s channel - https://www.youtube.com/channel/ucnbyrhayk9mltmn9oapp1va

7 of the best code playgrounds - http://www.sitepoint.com/7-code-playgrounds

netbeans – https://www.netbeans.org

javafx 8 introduction by example - http://www.apress.com/9781430264606

nashorn - https://wiki.openjdk.java.net/display/nashorn/main

enzo - https://bitbucket.org/hansolo/enzo/wiki/home

harmonic code - http://harmoniccode.blogspot.com/

about these ads
JavaFX

Published at DZone with permission of Carl Dea, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • JavaFX Gets Video Capabilities
  • The Challenges of a JavaFX Reboot
  • Calling JavaFX From Java?
  • Wrapping Mule4 — Secure Properties with TornadoFx

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: