Skip to content
Advertisement

Tag: javafx-2

Translucent blurred background in JavaFx

I want blurred translucent background effect in my JavaFx app like in the following image. But I cannot find any satisfactory answer anywhere. This answer provides some workaround, it takes screenshot of background and sets it as background image. But the problem is, if background changes, it remain as it is.. (see screenshot) So, I have two questions If it

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 “Location is required.” even though it is in the same package

I am trying to get my JavaFX program to run but am having some difficulty. I keep getting an error of ‘java.lang.NullPointerException: Location is required.’ The fxml file is in the same package as Application class. Here is my very simple code: And here is a copy of my main.fxml file: The controller class does exist and is in the

Copy image from JavaFX application and paste it using Windows

I am working on a JavaFX application. I want to copy image from application using context menu and paste it using Windows feature of paste. For example, like shown below in images. And want to paste at location from using of Windows features menu. Answer Use the Clipboard and ClipboardContent, e.g. as: For the “Paste” operation of Windows context menus

JavaFX and OpenJDK

I’m trying to decide whether I could switch to JavaFX for the user interface of my Java application. Most of my users would be using the Oracle JRE, which has JavaFX integrated these days. However, some are using OpenJDK (on linux). This (old) question suggests that OpenJDK deals very badly with JavaFX. According to this question, the alternative OpenJFX will

JavaFX 2.2 TextField maxlength

I am working on a JavaFX 2.2 project and I have a problem using the TextField control. I want to limit the number of characters that a user will be able to enter into each TextField. However I can’t find a property or something like maxlength. The same problem existed in Swing and was solved this way. How to solve

Advertisement