r/JavaFX • • Nov 02 '20

I made this! Maven + jpackage Sample Project, jtoolprovider Maven Plugin

12 Upvotes

I just created two projects on GitHub that may be of interest to anyone working with JavaFX, Maven, and native installers.

First, https://github.com/wiverson/maven-jpackage-template is a Maven-only example project that shows how a single pom.xml can be used to create both a Windows and macOS installer package. It used a shaded jar to automatically integrate Maven declared dependencies. The pom is pretty heavily commented, and shows how provided modules (such as JavaFX) can be excluded from the shaded jar. Because of the full, automatic module management in this sample project, jpackage is producing nicely slimmed installers (30-40MB).

The sample template relies on a plugin I built, https://github.com/wiverson/jtoolprovider-plugin which provides a simple binding to bridge the JDK ToolProvider API with Maven. This allows for access to jmod, jar, javac, javadoc, javap, jdeps, jlink, and jpackage all via Maven directly. This plugin is now available via Maven Central.

Any feedback or thoughts appreciated!


r/JavaFX • • Sep 29 '20

JMetro version 8.6.14 and 11.6.14 released

Thumbnail
pixelduke.com
12 Upvotes

r/JavaFX • • Aug 20 '20

JavaFX: Android Audio Support Complete

Thumbnail
youtube.com
12 Upvotes

r/JavaFX • • Aug 05 '20

How do I make my javaFX software a verified publisher for windows 10?

12 Upvotes

Hello, I have created a javaFX EXE file that succesfully installs and runs my application.

the problem is that when its downloaded, certain versions of windows 10 home kill my application in seconds because it is from an unverified publisher. How do I become a windows 10 verified publisher, and how do I sign a JavaFX application specifically?

Has anyone already gone through this process who can give me a heads up on how its done?


r/JavaFX • • Apr 24 '20

Tutorial JavaFX Software: Image Editor

Thumbnail
youtube.com
12 Upvotes

r/JavaFX • • Apr 11 '20

I made this! Game-2D with JavaFx

12 Upvotes

Hi all,

I hope you are well !

I want to share with you my first 2D game with JavaFx.

Github link : Game-2D

I would love to learn more about your opinions. Can you please give me your feedback and make star if you like the game?

Thank you!


r/JavaFX • • Apr 03 '20

Sad state of cross platform GUI frameworks

Thumbnail
blog.royalsloth.eu
12 Upvotes

r/JavaFX • • Mar 28 '20

Cool Project Open Lowcode - a low-code platform with javafx thin client

12 Upvotes

Hi there,

Open Lowcode has just been released in open-source. The pkatform is made on a home-made javafx-based thin client. I chose this over a web architecture in order to:

  • limit network bandwidth usage

  • have richer components than typical web components

  • have a clearer separation of business data and layout

  • limit obsolescence cost (javafx is very stable) in an enterprise context where applications can live for 30 years.

I would be glad to have your feedback.


r/JavaFX • • Feb 13 '20

2020 the year of javafx on desktop with jbang ?

12 Upvotes

https://www.youtube.com/watch?v=9q-_QhT1fj4

sorry for the spicy title, but I always wanted to play with JavaFX but the weirdness around the way JavaFX been packaged over the years made me never actually succeed.

With jbang's latest release I've now made this much much easier (at least for me). Just have your main javafx class declare its dependencies with

//DEPS org.openjfx:javafx-graphics:11.0.2:${os.detected.jfxname}

or any other javafx dependencies and jbang will figure out how launch it properly on Java 8 or higher, with modules or not. Great for trying things out, experimenting and add a bit of color to a few scripts ;)

If you have jbang already installed you can simply run the two examples shown in the video like this:

jbang https://github.com/maxandersen/jbang/blob/master/examples/jfx.java
jbang https://github.com/maxandersen/jbang/blob/master/examples/jfxtiles.java

If you want to know more about jbang see my blog post and the readme.


r/JavaFX • • Dec 23 '19

JVM Application Installer Tool Written in Kotlin and JavaFX

12 Upvotes

I wrote an open-source JVM application (for Java, Kotlin) Installer Generator in Kotlin and JavaFX. It creates installers using a GUI for your applications for Windows and OSX. I blogged about it here. The tool, called Installmation is here.


r/JavaFX • • Dec 07 '18

Zulu Gets Graphical With OpenJFX - Azul Systems Blog

Thumbnail
azul.com
12 Upvotes

r/JavaFX • • Oct 16 '18

Javafx roadmap

12 Upvotes

Hi there, simple question,. Where can I find the roadmap for jfx?I would like to know which evolution are being currently considered or debatted and maybe contribute.

I have been to openjfx and javafx11 webpage so far with no success.

Thanks


r/JavaFX • • Jul 23 '18

JavaFX links of the week, July 23 | JavaFX News, Demos and Insight // FX Experience

Thumbnail
fxexperience.com
12 Upvotes

r/JavaFX • • Dec 11 '17

I released my JavaFX Grid-"View" library some time ago. Take a look!

12 Upvotes

For a project of mine I had the need to create a Grid with values for the user which he could edit. For that I created the following library:

https://github.com/FancyJavaStuff/TransferGrid

It takes in an Object and returns Grid, which contains Labels, TextFields etc. the user can edit. It automaticly creates the needed listeners that will set those values.

All you need to do for it, is to give your variables the right Annotations.

Feel free to use it; if you find any bugs, report it!

If this isnt allowed, delete it :p


r/JavaFX • • Sep 26 '17

New Scene Builder Releases for Java 8 and Java 9

Thumbnail
gluonhq.com
12 Upvotes

r/JavaFX • • Sep 17 '17

Styling JavaFX applications using CSS

Thumbnail
callicoder.com
12 Upvotes

r/JavaFX • • Apr 17 '17

JavaFX Simple Inventory Management App - Open source (x-post from /r/java)

12 Upvotes

Hi.

PHP developer here who is learning Java for few months and who has decided to create an open source software for learning purpose.

My goal was to improve Java and OOP skills and finally to learn Hibernate ORM and JavaFX frameworks and Maven tool.

As result of my efforts I created Inventory Management Desktop app.

https://github.com/vatri/InvMan

( All details are in the readme file. )


I am sharing it here for few reasons:

  1. To hear if I correctly use SOLID principles and other standards in Java and get some programming or any other feedback. Don't forget, PHPer here... :)

  2. To share with you so you can use it for your projects. It's under the MIT license (totally free as I understand the license).

  3. To get feedback and suggestion on how I can improve it - for end users.

Thanks in advance! :)


r/JavaFX • • Nov 14 '16

How good is JavaFX for 3D games?

12 Upvotes

I've run a few example programs, and javaFX seems pretty straightforward to write and runs on slower hardware than something like LWJGL, which is great. Is it worth using for simple 3D games though? Thanks.


r/JavaFX • • Aug 09 '16

JavaFX Interpolation (and Image Processing in general)

12 Upvotes

JavaFX is neat, no doubt. But what ever happened to basics first? Why would anyone decide that it's a good idea to limit interpolation through all of Prism to bilinear interpolation, and be done with it:

There are so many use cases where you absolutely need NN interpolation, not even necessarily for performance. Yet here we are, and setSmooth() does nothing.

Well, we're programmers and need to get things done, so let's do this anyways. What are the options?

  1. Use BufferedImages and convert from JavaFX Image to BufferedImage and back by SwingFXUtils.

  2. Write your own resampling (e.g. just for rescaling).

Option one is terrible, since BufferedImages and JavaFX Images are completely different. So you're going to create lots of garbage, since int (or byte) buffers can't be shared/reused (please correct me if I'm wrong). Other than that, BufferedImages are great, you retrive a handle to Graphics2D from where you can set the rendering hints and do a super fast call to drawImage in order to rescale an image (nn, bilinear, or bicubic - the good old hints). This begs the question why JavaFX doesn't (re-)use BufferedImages in the first place. Instead of comming up with their completely own thing, why not offer a wrapper for BufferedImages (e.g. extended with FXesque properties or what not). But no, scrap BufferedImages, they suck, let's reinvent the well instead...

So let's have a look at option two: let's implement the classic "General Filtered Image Rescaling" algorithm by Dale Schumacher (in Graphics Gems III, available online). That's what I did: first for BufferedImages/AWT, then for JavaFX, working with PixelWriters and PixelReaders. With BufferedImages you get the DataBuffer (or just as an int/byte array) and operate directly on it, which is reasonably fast (yet much slower than the call to drawImage from above; but you get to implement your own filters, which is nice...). Even the getSample/setSample (not Pixel(!) and then manual int unpacking) are only a tad bit slower. And with JavaFX Images? The API, in comparison, is lacking. And the speed is far worse (granted, maybe I haven't figured out how to do bulk pixel manipulation in the most efficient way yet, but then maybe it shouldn't be that hard to begin with...). Anyways, BufferedImages offer a much better/extensive API, and, from what I can tell, they're also much more efficient (turns out going FX Image -> BI -> drawImage -> FXImage is still much faster than doing your own thing on FX Images with PixelReaders/Writers).

This probably comes of as a rant at this point (it probably is to some degree), so don't get me wrong: I really try to like JavaFX, and for the most part I actually enjoy it very much. But things like this are kind of... eh. Why did they have to come up with yet another Image-class. BufferedImages work, don't they? And if you come up with yet another Image-class anyways, why would you just half-ass it (see setSmooth, which even if it would work, only would allow to toggle between NN and bilinear interpolation. What about bicubic, or what not... while reinventing wheels)? What's the point? From what I hear the JavaFX project is quite low on manpower anyways, so why waste it on such a thing (I'm genuinely interested, so if anyone could shed some light on this...)?

And, finally, why would you hardcode the interpolation algorithm throughout the prism pipeline? Who the hell thought that this would be a great idea? This is IMHO basic (as in important) stuff; yet priorities have been put somewhere else, it seems. I just don't get it.


r/JavaFX • • Sep 19 '26

Cool Project PatternFX - MVC, MVP, MVVM templates for JavaFX

11 Upvotes

I'd like to introduce our project - PatternFX. It is a framework that provides developers with templates for MVC, MVP, and MVVM patterns. Although the templates are different, they share a common architectural foundation.

The framework is designed purely for practical use and can be used to build both simple and highly complex applications. For example, our ShellFX platform is built on top of this framework.

One of the key features of the framework is modeling a window as a component tree, where components can be dynamically added and removed. Each component is implemented using one of the provided templates - MVC, MVP or MVVM. Using multiple templates within a single tree is not supported.

Another distinctive feature of the framework is how communication between components is organized. Some solutions use a bus for this, but we decided to use ports instead. A Port is an interface to the key element of a component: its Controller/Presenter/ViewModel. On the one hand, a Port provides a reliable, type-safe communication channel; on the other, it strictly limits access. A component can have N ports, with each client being given only the API it needs.

Key features include:

  • Component-oriented architecture.

  • Support for the component lifecycle.

  • Models the window as a component tree.

  • Supports dynamic component composition.

  • Organizes core tasks within the view.

  • Supports component inheritance.

  • Supports preserving component history.

  • Provides component-level logging support.

  • Designed without FXML dependency.

  • Includes a demo for each template.

  • Comprehensive documentation.

The demo module implements the same example using all three templates, allowing you to explore and compare the characteristics of each approach.

I hope you find the project interesting and useful.


r/JavaFX • • Jul 16 '26

I made this! Reachability Annotations for generating GraalVM metadata

11 Upvotes

We recently open sourced some of our annotation processors for generating GraalVM native-image metadata: HebiRobotics/reachability-annotations.

It's a completely standalone compile-time dependency, so it has no effect at runtime and doesn't rely on frameworks like Quarkus or Micronaut.

Besides annotations for generating very customized metadata, we also added two annotations for JavaFX that automatically parse FXML and CSS files and generate appropriate rules for reflective accesses and resources.

@ReachableFxView("control")
public class JavaFxView {}

@JavaFXView follows the standard JavaFX view convention (FXMLKit, Afterburner etc.) and automatically generates metadata for

  • control.fxml -> fx:controller, fx:include, imports, resources, ...

  • control.css -> import resources

  • control.properties -> bundle

and @ReachableFxResources can parse multiple files based on wildcards.

@ReachableFxResources({
    "**/*.fxml",
    "**/*.css",
    "/assets/images/*.png"
})
public class JavaFxView {}

Here are the changes it'd take for the gluon-samples to run without an agent: gluonhq/gluon-samples/pull/189


r/JavaFX • • Jun 25 '26

I made this! FX Flow 0.6.1 released, declarative UI building for JavaFX

11 Upvotes

I've released FX Flow 0.6.1, a JavaFX utility library focused on declarative UI construction, and reducing boilerplate around models, validation and reactive UI updates. See the end of this post for a full example.

Some highlights since the 0.5 release:

Validation feedback directly from domains

Domains can now contain Rules, which is a predicate associated with a Template explaining why a value is invalid. All built-in domain factory methods now provide validation messages. Domains can provide templates for out of range values, misaligned values, missing values, non matching values (regex), etc.

Together with the new ValidationEvent, AbstractMarkerPane and ValidationMarkerPane, validation feedback can be surfaced in the UI without wiring validation logic directly into controls. See the ValidationSampleApplication.

Coordinated observable updates

A new UpdatableValue type allows multiple values to be updated atomically, ensuring listeners never observe intermediate state because the listeners of the individual properties are only fired until all values have been updated:

// Create two updatable values (similar to properties):
UpdatableValue<String> firstName = UpdatableValue.of("Jane");
UpdatableValue<String> lastName = UpdatableValue.of("Smith");

// Observe them:
Observe.values(firstName, lastName)
    .subscribe((fn, ln) -> System.out.println(fn + " " + ln));  // prints "Jane Smith"

// Modify both properties at once:
UpdatableValue.set(
    firstName, "John",
    lastName, "Doe"
);

In this example, it will initially print Jane Smith followed by John Doe. The subscriber only sees the final (John, Doe) state. If you put a direct ChangeListener on one of these properties (and then use get to read the value of the other) you will not observe a temporary incorrect combination either (so you will never see Jane Doe or John Smith).

The advantage of using Observe.subscribe with multiple values is convenience, and that you also get notified if only one of the values changed (ie. from John Doe to John Miller) without having to manually monitor both properties.

Feedback and suggestions are welcome.

GitHub: https://github.com/int4-org/FX/releases

Full example:

public class ValidationSampleApplication extends Application {

  public static void main(String[] args) {
    Application.launch(args);
  }

  @Override
  public void start(Stage primaryStage) {
    StringModel name = StringModel.of(Domain.regex("[A-Z][a-z]+", Template.of("custom.startsWithCapital")));
    IntegerModel age = IntegerModel.of(null, Domain.bounded(18, 120));

    /*
     * Create a scene with a ValidationMarkerPane as the root. Markers will be overlaid
     * on the controls within the pane:
     */

    Scene scene = Scenes.create(
      ValidationMarkerPane.of().onMarkerCreated(this::installTooltip).content(
        Panes.vbox("form").nodes(
          Panes.grid("grid")
            .row("Name", FX.textField().promptText("Name (e.g. John)").model(name))
            .row("Age", FX.textField().promptText("Age (18-120)").model(age)),
          FX.button().text("Submit")
            .enable(Observe.booleans(name.valid(), age.valid()).allTrue())
        )
      )
    );

    /*
     * Add some basic styling.
     */

    scene.getStylesheets().add(StyleSheets.inline(
      """
      .form {
        -fx-padding: 2em;
        -fx-spacing: 1.5em;
        -fx-alignment: top-center;
      }
      .grid {
        -fx-hgap: 1em;
        -fx-vgap: 1em;
      }
      """
    ));

    primaryStage.setScene(scene);
    primaryStage.setTitle("Validation Marker Sample");
    primaryStage.sizeToScene();
    primaryStage.show();
  }

  private void installTooltip(Marker marker) {
    marker.validationIssueProperty().subscribe(issue -> {
      Tooltip tooltip = marker.getTooltip();

      if(tooltip == null) {
        tooltip = new Tooltip();

        marker.setTooltip(tooltip);
      }

      tooltip.setText(switch(issue) {
        case ValidationIssue.Invalid(Object _, Template template) -> toMessage(template);
        case ValidationIssue.Incompatible(Template template) -> toMessage(template);
      });
    });
  }

  static String toMessage(Template template) {
    return MessageFormat.format(
      switch(template.key()) {
        case "domain.missing" -> "Must not be empty";
        case "domain.invalid" -> "Must be a valid value";
        case "domain.notContained" -> "Must be one of {0}";
        case "domain.noMatch" -> "Must match regular expression {0}";
        case "domain.outOfRange" -> "Must be between {0} and {1}";
        case "domain.misaligned" -> "Must be a multiple of {1} starting from {0}";
        case "conversion.incompatible" -> "Must be a compatible value";
        case "custom.startsWithCapital" -> "Must consist of two or more letters and start with a capital";
        default -> "Invalid (" + template.key() + ")";
      },
      template.args().values().toArray()
    );
  }
}

r/JavaFX • • Jun 04 '26

I made this! FlexGanttFX in Browser via JPro

11 Upvotes

The latest FlexGanttFX showcase application can now be tried out online at https://demos.jpro.one/flexganttfx-showcase.html

Or install locally via jdeploy https://www.jdeploy.com/~flexganttfxshowcase


r/JavaFX • • Apr 29 '26

Showcase CEFFX: Prebuilt natives added - no need to compile anything

11 Upvotes

We recently introduced our CEFFX project (a library for integrating the Chromium Embedded Framework into JavaFX) and it was well received. Based on that feedback, we decided to simplify its usage by providing prebuilt native libraries. This allows you to use the library without having to compile anything yourself.

All native binaries are packaged into the ceffx-natives module using classifier names similar to those in OpenJFX:

  • linux (ubuntu-22.04 runner)

  • win (windows-2022 runner)

  • mac (macos-15-intel runner)

  • mac-aarch64 (macos-15-arm64 runner)

The last one (mac-aarch64) will be available once the runner becomes free... eventually :)

The README contains detailed instructions on how to use them, and the overall flow is illustrated in this demo diagram:

Before the release, it is necessary to use our snapshot repo. Tested on Linux and Windows.