Skip to content
Advertisement

Tag: javafx

How to create a JavaFX Maven project in IntelliJ IDEA?

How can I open a JavaFX Maven project from scratch in IntelliJ IDEA? As there is no difference between a Java project and a JavaFx project, I want to open a dedicated JavaFX project (Selection JavaFX from create project Wizard) with Maven module included. Answer Although dated I’m answering this because I had the same question recently and too many

JavaFx equivalent of Swing JFrame

I am learning JavaFX. I have encountered a problem; I cannot figure out what is the equivalent of a Swing JFrame in JavaFX. Is it the Scene or the Stage? Answer The equivalent of a Swing JFrame in JavaFX is the Stage class which extends from Window and can be made visible by calling show() method. The Scene is more

How to hide TableView column header in JavaFX 8?

I need to have an observable list of a type that will be displayed in a TableView with one single column, that when selected will display the rest of its information on the right. The TableView is wrapped in a TitledPane, which is wrapped in an Accordion. See image below: As you can see in this scenario I don’t want

How do I put something on an FX thread?

I’m new to JavaFX (trying to move from Swing), and am trying to make a very basic window first. However, I keep getting the following runtime exception: However, looking at the JFXPanel source code, the constructor calls its initFX() method, which initializes the FX application thread. Why, then, am I getting this error, and how do I fix it? Answer

How to rotate the LinearGradient in a given Shape?

I try to find the way to rotate the LinearGradient object nested into e.g. Rectangle object, say: Now, I try to rotate this lg object, for example for 45 degrees to the left, but without rotating the whole rect. Is there any way to achieve that? Answer The first parameters that are given to the LinearGradient constructor are the coordinates

“No select item” on JavaFX combobox?

What is the correct way to put an item which value is null, inside a ComboBox? I tried using myComboBox.getItems().add(null);, and it works, but whenever the user selects this value on the combo box, an exception is thrown on the console: So i think maybe this is not the correct way of doing that. Any clues? Answer In my experience,

JavaFX Table Cell Editing

I am trying to make a program in Java to manage my bookie accounts. I’m new to java, so I thought I would chose something simple to see how things work. I decided to use a tableview and make the individual cells editable. I’ve been following this tutorial http://java-buddy.blogspot.co.uk/2012/04/javafx-2-editable-tableview.html. It details how to do it using java code, and copying

Advertisement