Questions tagged [javafx]

The JavaFX platform enables developers to create and deploy Graphical User Interface (GUI) applications that behave consistently across multiple platforms. JavaFX 1.3 and older, were scripting languages, whereas JavaFX 2.x+/8.x enables users to use Java. FXML enables JavaFX to follow an MVC architecture.

The JavaFX platform enables developers to create and deploy Graphical User Interface (GUI) applications that behave consistently across multiple platforms. It is built on java technology and was part of the Oracle JDK from JDK 8 until Java 10. Since JDK 11, JavaFX is shipped as a library, independent of most JDK and JRE distributions.

External Resources

Tag Usage

  • javafx accumulates questions on all version as it tends to be used on the current version at the time the question is asked.
  • javafx-18 is dedicated to questions that are specific to the JavaFX 18 version.
  • javafx-17 is dedicated to questions that are specific to the JavaFX 17 version.
  • javafx-11 is dedicated to questions that are specific to the JavaFX 11 version.
  • javafx-8 is dedicated to questions that are specific to the JavaFX 8 version.

Outdated tags - do not use, instead update your environment to a recent version

  • javafx-2 is dedicated to questions that are specific to the JavaFX 2+ version.
  • javafx-1 is dedicated to questions that are specific to JavaFX 1.x releases which used JavaFX Script language

Frequently Asked Questions

People often ask these questions about this topic:

Installation

Resource Lookup

FXML

Packaging

Virtualized Controls

Misc

38047 questions
6
votes
1 answer

Java 10 JavaFX java.lang.IllegalAccessError

I'm trying to update my JavaFX Gradle project to Java 10. I've changed my build.gradle file like in this guide. But when I try to run the project (execute ./gradle run), I get this error: > Task :run FAILED Exception in Application start…
Kiryl Tkach
  • 3,118
  • 5
  • 20
  • 36
6
votes
2 answers

Run a JavaFX 11 Maven project in IntelliJ IDEA using a run/debug configuration

I want to run a HelloWorld JavaFX 11 application using Maven from IntelliJ IDEA using a run/debug configuration to be able to debug the application. I've created a Maven project in IntelliJ IDEA with pom.xml and HelloFX.java. I can build the project…
DfM
  • 529
  • 6
  • 19
6
votes
5 answers

Java Processing 3 PAplet in JavaFX scene as FXNode

I am trying to make a program for visual analyzing Fractal sets. I choose Processing 3 as drawing library and JavaFX for the user interface. There are some screenshots of the current state: My GUI: there is Launcher code: import…
Jan Černý
  • 1,268
  • 2
  • 17
  • 31
6
votes
0 answers

package x is declared in the unnamed module, but module x does not read it

I want to migrate to Java 11 and JFX11 using netbeans. JFX11 must be used as module, so I have added the JavaFX jars and added the following in my module-info.java under the default package folder. requires javafx.controls; requires…
Dodd10x
  • 3,344
  • 1
  • 18
  • 27
6
votes
1 answer

Gradle OpenJFx11 : Error - JavaFx runtime components are missing

Context: Trying to create a simple JavaFx application using OpenJdK11 & OpenJFx11 Issue: I get an error as below when I try to execute Error: JavaFX runtime components are missing, and are required to run this application I referred to Link1 &…
iCoder
  • 1,406
  • 6
  • 16
  • 35
6
votes
1 answer

How to do a "shine" effect in CSS (see the picture below) on a button in JavaFX?

This is the css I've tried: .button { -fx-background-radius: 4; -fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.7), 10, 0, 0, 1); -fx-background-insets: 0, 1; -fx-padding: 5 20 5 20; }
Nouvea
This is the…
jeff
  • 63
  • 3
6
votes
2 answers

How to implement CAPS LOCK alert bubble on password field in JavaFX?

I’m trying to implement a caps lock alert on password field. If caps lock is ON then the bubble will appear below the password field. I’ve searched a lot but didn’t get any solution that how can I implement such bubble on input fields in JavaFX.…
6
votes
2 answers

Remove beep sound upon maximizing JavaFX Stage with Alt+Enter

I want my JavaFX App to be maximizable by Alt+Enter, so I added: scene.addEventFilter(KeyEvent.KEY_PRESSED, event -> { if (event.getCode() == KeyCode.ENTER) { if (event.isAltDown()) { setFullScreen(!stage.isFullScreen()); …
user38725
  • 876
  • 1
  • 10
  • 26
6
votes
1 answer

JavaFX - Can't use underscores in MenuItem

I was creating a progrma with JavaFX when I came across a very strange problem. I wanted to create a MenuItem with a text that contains underscores (_), but when that text is displayed the underscores disappear. Here is an example code: public class…
eric.m
  • 1,577
  • 10
  • 20
6
votes
1 answer

JavaFX Minimizing & Maximing undecorated stage with animations

I am using the accepted answer in this question: JavaFX Minimizing Undecorated Stage to minimize my app properly. However, unfortunately the default Windows minimize & maximize animations are not shown at all (the window just appears and…
user38725
  • 876
  • 1
  • 10
  • 26
6
votes
1 answer

JavaFX TextFlow ScrollBar

I am creating small project in JavaFX. I created a TextFlow field to show messages i chat. It looks good but, When I add more messages this field does not make ScrollBar like TextArea. I set max height in SceneBuilder but it does not work. Is…
John Kyle
  • 127
  • 1
  • 10
6
votes
2 answers

How do I change the speed of an AnimationTimer in JavaFX?

I'm trying to change the speed of an AnimationTimer so the code runs slower, here is the code I have so far: AnimationTimer timer = new AnimationTimer() { @Override public void handle(long now) { if (upOrDown != 1) { …
JohnIsCool222
  • 61
  • 1
  • 2
6
votes
1 answer

JavaFX icon quality in taskbar

When setting a png image as the stage icon in JavaFX (using Kotlin, but this is also a problem in Java), the icon seems to be deformed. I have googled for this problem, and found the following things: It was (and probably still is) a bug. On the…
Abby
  • 1,610
  • 3
  • 19
  • 35
6
votes
2 answers

Netbeans JSR-296, Swing and JavaFX, what are we now meant to use?

I am starting to learn Java development (I used to develop in C++), I am using some older materials, however, I would also like to keep up to date with Java developments and recommendations. I did some background research regarding Swing and…
user427165
6
votes
3 answers

JavaFX getting single resize events

This question is rather simple: Is it possible to receive resize events that only trigger once, even if width and height change at the same time? I have an application that calculates an image in the size of the window pixel per pixel. When the…
Jhonny007
  • 1,698
  • 1
  • 13
  • 33
1 2 3
99
100