What is the recommended way to make a numeric TextField in JavaFX?

I need to restrict input into a TextField to integers. Any advice?

How to create a modal window in JavaFX 2.1

I can't figure out how to create a modal window in JavaFX. Basically I have file chooser and I want to ask the user a question when they select a file. I need this information in order to parse...

How to Convert FXML to JAVA

I created a .fxml file using javafx scene builder in NetBeans. How can I convert .fxml file in NetBeans to .java? Is that any program to convert it? I am not very good in fxml so I want to use...

How to add border to panel of javafx?

I am developing a application where I need some widgets to wrap up inside a panel. And I want to put a border around it. I am a swt programmer where in composite I can pass swt.border to put...

JavaFX TextArea and autoscroll

I am trying to get a TextArea to autoscroll to the bottom with new text which is put in via an event handler. Each new entry is just one long string of text with each entry separated by a line...

JavaFX on Linux is showing a "Graphics Device initialization failed for : es2, sw"

I've just started coding/testing JavaFX stuff on Linux and I'm facing an error at time to start a simple app. I found many people concerning about that in Foruns but I could find a clear...

JavaFX menu item show shortcuts on right hand side

Take for example the menu items from the edit menu in JavaFX Scene Builder See how they display the shortcuts on the right? Is there any easy way to achieve the same effect using JavaFX? Thanks.

How to compile an .app bundle for OSX

I need to create a .app file in order to use my javafx application on osx. I already read this, but it doesn't help much... The tutorial above has a topic "DMG Package" but when I compile my app...

How to install Java 8 on Mac

Editors note: This question was asked in 2014, and the answers may be outdated. I want to do some programming with the latest JavaFX, which requires Java 8. I'm using IntelliJ 13 CE and Mac OS X...

Get the height of a node in JavaFX (generate a layout pass)

How to get the height or prefer height of a node in JavaFX, I have 3 VBox and I want to add nodes to the the most freer panel, example: Childrens Total Height of the...

cannot resolve symbol javafx.application in IntelliJ Idea IDE

I tried to create a JavaFX application in IntelliJ Idea IDE but I got compile error that said: java: package javafx.application does not exist. I have changed the Project SDK and the Project...

JavaFX : How to get column and row index in gridpane?

I tried to get the row/column index of gridpane, when I click. I am looking for method like as getSelectedColumn() in JTable(java swing) I searched this. gridPane.getRowIndex(node) But it doesn't...

JavaFX scaling a group of shapes without affecting stroke width

I have a custom component that manages a set of shape nodes (path). I also need to be able to horizonatal zoom and pan, so I thought I'd put all the shapes in a group and scale/translate the X...

JavaFX TableColumns' headers not aligned with cells due to vertical scrollbar

after having spent the last few hours searching the web for this issue I decided that I need your help. The issue is similar to this topic:...

Add Tab to a TabPane JavaFX

I am trying to add a new tab with fxml. I already add tabs to the tabPane. int numTabs = tabPane.getTabs().size(); Tab tab = new Tab("Tab " + (numTabs + 1)); tabPane.getTabs().add(tab); But I...

What does it mean: JavaFX application class must extend javafx.application.Application?

What is meant by this error: Error: Main method not found in class Static.A, please define the main method as: public static void main(String[] args) or a JavaFX application class must...

Java Application this operation is permitted on the event thread only Error

I have the class PlayerScreen that creates the graphics of a class and i want to run it from the class MainGUI but i keep getting java.lang.IllegalStateException: This operation is permitted on...

Robot.mouseMove(1000,1000) moves mouse to random locations on screen... why?

public class MoveCursor extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage stage) throws Exception { ...

Sort ObservableList Objects by Their Value Java

I have a class Student with these fields: private int id; private String firstName; private String lastName; private String imageLink; private String email; private String status; private String...

How to make editable a disabled TextField in JavaFX

I'm working with JavaFX. I have a disabled TextField. private TextField numberField; How can I make the TextField enable/editable? I have used: numberField.setVisible(true); But it's not working.

Hibernate has difficult with create table using MySQL

I'm doing a school project in architecture client-server with JavaFX, Maven, Hibernate etc I have big problem with implementation alone Hibernate (without Spring). Im not sure that is problem...

Create JAR file using Net Beans including all dependent libs and folders

I have created a JavaFX application using NetBeans IDE and below is my folder structure. I want to a build a single jar file including all dependencies for this jar to work properly. This jar...

superclass access check failed: class com.sun.javafx.sg.prism.web.NGWebView

I have just installed SDK 11 and using Javafx from maven. My pom is as follows. <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" ...

Button underline text on hover

I am working with JavaFX, and I have a Scene object I created in SceneBuilder with a bunch of Button objects. I want the text of each of these Button objects to be underlined when the mouse cursor...

How do I determine the correct path for FXML files, CSS files, Images, and other resources needed by my JavaFX Application?

My JavaFX application needs to be able to find the FXML files to load them with the FXMLLoader, as well as stylesheets (CSS files) and images. When I try to load these, I often get errors, or the...

Getting "Module javafx.controls not found" error Java Eclipse IDE

I am using Eclipse IDE 2020-03 version with Java. I am trying to use FXML, checked some tutorials and steps online and followed them. But I am still getting the following error: Error occurred...

Why JavaFX application and scene builder is showing garbled text?

Here's how my scene builder looks like: and here's the GUI: The standalone scene builder: I just run the following source code from Java SDK demos: package sample; import...

why do I get "The type GraphicsContext from module javafx.graphics may not be accessible to clients due to missing 'requires transitive'" warning?

Whenever I create a GraphicsContext object in my JavaFX application, it creates an error that reads: The type GraphicsContext from module javafx.graphics may not be accessible to clients due to...

Java Selenium error: NoClassDefFoundError: org/openqa/selenium/HasAuthentication

I use Java with Selenium (in general I use ChromeDriver) with Eclipse IDE and I get an error when I try to run: Exception in thread "main" java.lang.NoClassDefFoundError:...

Mac - how to install java 17

Could someone please let me know the steps to install Java on a Mac. I did brew install java I get this Warning: openjdk 17.0.1 is already installed and up-to-date. To reinstall 17.0.1, run: ...