Personal tools
  •  
You are here: Home Tutorials WORLDCOMP'15 Tutorial: Dr. Mark C. Lewis
Call For Participation
General Attendees
Click here for details


Call for Papers
Submission of
LATE BREAKING PAPERS

Click here for details


Important Dates
July 27-30, 2015
The WORLDCOMP'15
20 joint conferences


Featured Workshops
Doctoral Colloquium
&
Demos Sessions

Click here for details


« September 2015 »
Su Mo Tu We Th Fr Sa
12345
6789101112
13141516171819
20212223242526
27282930
 

WORLDCOMP'15 Tutorial: Dr. Mark C. Lewis

Last modified 2015-07-12 11:19


JavaFX Quickstart – Moving Beyond Swing for Rich User Interfaces
Dr. Mark C. Lewis
Professor, Department of Computer Science
Trinity University, USA

Date: Date & Time: July 28, 2015 (05:40pm - estimated duration: about 2+ hours)
Location: Ballroom 4


Abstract

    Swing was the recommended library for GUI development in Java from 1997 until 2014. With the release of Java 8, JavaFX 8 became the standard for JVM client-side programming. Oracle is now pushing all client-side developers to migrate over. This is a significant request, given the knowledge base that developers and educators have built up in Swing.

    The investment in learning JavaFX is not without benefits. JavaFX corrects many of the flaws of Swing and Java2D, and adds support for many new elements that required 3rd party libraries when using Swing and Java2D. This tutorial aims to bring attendees quickly up to speed with the JavaFX library and shows how to integrate many of these new features into a project. The topics covered will include:

      • Basics of scenes in JavaFX,
      • The FXML layout specification
      • Properties and bindings
      • Dealing with concurrency
      • Advanced features such as charts, media, and 3D support.
    The discussion will be relevant to those who have their own projects that they need to migrate to JavaFX as well as to educators, who will need to use JavaFX for courses that use GUIs on the JVM. The presentation will involve new language and library features introduced in Java 8 such as lambda expressions and the stream libraries.

Objectives

    Swing became the recommended library for GUI development in Java with its integration into what were originally call the Java Foundation Classes in 1997. It held this position until 2014. During that time, anyone doing client-side development with Java inevitably became familiar with the Swing libraries. This includes many educators, who have used the Swing libraries as a nice standard library for teaching GUIs to well over a decade of students.

    With the release of JavaFX 8 as part of the Java 8 platform, Oracle is now pushing all client-side developers to switch from Swing to JavaFX. JavaFX started life in 2007-2008 as a separate scripting language aimed at the creation of rich user interfaces. Version 2.0, which was released in 2010, turned it into a library for Java that was accessible to other JVM languages. The current version, JavaFX 8, has added elements like native 3D support to a list of components that go well beyond what was available with Swing.

    JavaFX is fundamentally based on a scene graph. This type of structure has long been used in 3D graphics packages built on top of lower level libraries like OpenGL. The tutorial will show how it this is used in the 2D setting and how one can get the features that were familiar in Swing, as well as others, using this approach.

    JavaFX was built to use a Model-View-Controller pattern. Part of this includes separating out the view from the other aspects so that non-programmers can potentially work on the visual representation. The FXML specification was created to accomplish this. It allows the scene graph to be constructed independently of the rest of the code. It is also worth noting that CSS can be used to adjust the appearance of JavaFX elements. Of course, you don't have to use FXML or CSS. You have the option of doing everything in code. This is advantageous if you are using JavaFX in your teaching, as it means that you don't have to spend time on XML and CSS. We will demonstrate both approaches.

    One of the challenges often faced in doing GUI development is tying the display to the model data that is behind it. A simple example of this is a numeric value that is associated with a graphical element like a slider, and perhaps text that also shows the value. Keeping things synchronized can be challenging with basic listeners, especially considering that other parts of the program might alter the numeric value, and those changes must be reflected in the GUI. This tutorial will show you how JavaFX solves this problem using properties and bindings. We will also cover how various features of Java 8, especially lambda expressions and streams, can be beneficial in JavaFX development. JavaFX 8 specifically uses interfaces with only a single non-default method in many places so that coders can use lambda expressions effectively.

    The tutorial will finish off covering some of the GUI elements that are new in JavaFX, and which did not have any equivalent under Swing. These include charts, for plotting data, media elements, and 3D components. Previously, one would have to go to 3rd party libraries or extra libraries like the Java Media Framework or Java3D in order to get support for these types of functionality. Now they are part of the standard Java install, you simply have to be using JavaFX in order to get access to them.

    If time allows, we will look briefly at the use of JavaFX on mobile devices.


Intended Audience

    This tutorial is intended for anyone who currently uses the Swing libraries, and would like to see what JavaFX has to offer and get a quick introduction to help them make the move over.


Biography of Instructors

    Mark Lewis has been teaching Computer Science at Trinity University since 2001. His courses span from introductory to advanced and tend to focus on aspects related to programming/programming languages and simulation/scientific computing. He has been the lead author on over 20 papers spanning a range of topics from planetary ring dynamics in the journal Icarus to the SIGCSE annual conference proceedings.

Conference Proceedings
Get WORLDCOMP'13 & '14 Proceedings
Click Here

Past Events
WORLDCOMP'14
Click Here

WORLDCOMP'13
Click Here

WORLDCOMP'12
Click Here

WORLDCOMP'11
Click Here

WORLDCOMP'10
Click Here

WORLDCOMP'09
Click Here

WORLDCOMP'06, '07, & '08
Click Here


Photo Galleries

Join Our Mailing List
Sign up to receive email announcements and updates about conferences and future events




 


Administered by UCMSS
Universal Conference Management Systems & Support
San Diego, California, USA
Contact: Kaveh Arbtan

If you can read this text, it means you are not experiencing the Plone design at its best. Plone makes heavy use of CSS, which means it is accessible to any internet browser, but the design needs a standards-compliant browser to look like we intended it. Just so you know ;)