Posts

Showing posts with the label javafx

Gluon Announces Full Java 9 Mobile Initiative

Gluon  has announced the  Gluon VM  project bringing Java 9 support to mobile developers and unlocking the availability of all OpenJDK APIs.  As a full OpenJDK implementation, the company says their Gluon VM will form the basis for future releases of  Gluon mobile , and will allow enterprise developers to benefit from the latest developments in Java 8 and Java 9. Launched 18 months ago, the Gluon mobile offering provides plugins for the main Java IDEs, for building Java applications for Android and iOS platforms using a single code base. According to company co-founder John Vos, Gluon Mobile abstracts out the underlying hardware, providing a common API for accessing hardware and building dynamic user interfaces. In order to execute Java code on mobile devices the device must be able to interpret Java bytecode, and therein lies the rub. Until now Gluon Mobile deployments on Android devices would ...

Differences between JavaFX and Swing

NOTE : Oracle hasn't completely abandoned Swing — it isn't deprecated, and Swing applications continue to work. But no work is being done anymore to enhance Swing, and Oracle has made it clear that JavaFX is the future. Here are ten basic differences between JavaFX and Swing. In JavaFX, all the world's a stage In Swing, the class that holds your user interface components is called a frame and is defined by the JFrame class. A frame is essentially an empty window to which you can add a panel, which serves as a container for your user-interface elements. A panel is defined by the JPanel class. A Swing application is actually a class that extends the JFrame class. To display user-interface components, you add components to a JPanel and then add the panel to the frame. JavaFX uses the metaphor of a theater to model the top-level containers of an application. A stage (defined by the Stage class) represents the highest level container — ty...

JavaFX adds docking library for easier use, better customization

DockFX fills a void, enabling developers to build fluid, customizable interfaces similar to Visual Studio, Eclipse, or GIMP JavaFX has been Java's under-the-radar platform for building rich client applications. While it hasn't garnered the attention that rival platforms like Adobe Flash or JavaScript have received, it continues to plod along in the Java development community, with a loyal set of users. One such user is building a docking library for the platform to make it easier to use. Found on GitHub, the DockFx library was built to fill what the developer cites as a void for docking frameworks available for JavaFX. "DockFX is a library that enables application developers to create customizable and fluid interfaces for their end users, move side panels, hide panels out of view, or drag panels out and get a closer look,". "The library makes it possible to create an interface similar to Visual Studio, Eclipse, or GIMP in very little time without ...

Example of Progress Bar and Progress Indicator in JavaFX 8

Image
Here is the code ///////////////////////////////////////////////////////////////////////////////////////// import javafx.application.Application; import javafx.geometry.Pos; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.Label; import javafx.scene.control.ProgressBar; import javafx.scene.control.ProgressIndicator; import javafx.scene.layout.HBox; import javafx.scene.layout.Priority; import javafx.scene.layout.VBox; import javafx.stage.Stage; /**  *   * @author Ravi Sharma  *  */ public class ProgressSample extends Application { final Float[] values = new Float[] { -1.0f, 0f, 0.6f, 1.0f }; final Label[] labels = new Label[values.length]; final ProgressBar[] pbs = new ProgressBar[values.length]; final ProgressIndicator[] pins = new ProgressIndicator[values.length]; final HBox hbs[] = new HBox[values.length]; @Override public void start(Stage stage) { Group root = ...