Skip to content
Advertisement

Tag: javafx

Accessing elements inside a GraphicsContext in JavaFX canvas

I’m implementing a simple hockey game following an MVC pattern. I’m having trouble refreshing the player’s position, which I have created inside a canvas using the GraphicsContext.drawImage() method. I’m inside an AnimationTimer anonymous class, inside the handle method. The positions and boundaries are all reflected to the backend,so I don’t really need to do any particular logic here, I just

Is there API of IDEA communicating with JCEF’s webview when developing IDEA’s plugin?

I am currently preparing for developing an IDEA plugin involving webview containing some information. Since I have developed a VSCode extension of similar functionalities and it uses many webviews, I plan to migrate those HTML to IDEA’s plugin by JECF. However, the functionalities require some interaction with the extension/plugin, as in VSCode I could click some elements of the webview

JavaFX – save canvas to png file

I’ve created a simple drawing program which just basically prints pictures on a canvas by choosing from 3 pictures and then the user can save the image that he created and open a previous image , the program works perfectly good , but I’m facing a problem : when I save the image , the image is not being saved

Place icon into top right of tabpane javaFX

I am using JavaFX 8 and have a tab pane as this: I was wondering if there was any way to place an icon into the top right of the tab pane such as in this My goal is to have a colored indicator in the top right of the tab pane that I can toggle between green and red

javafx – Graphics Device initialization failed for : es2, sw M1 MacOS

So, when I try to run my JavaFX Code sample on my M1 MBA I get this long error. https://pastebin.com/3EBekwVF I am using macOS aarch64 javafx sdk from https://gluonhq.com/products/javafx/ I added the SDK to the Java Build Path via right clicking on the project -> selecting Java Build Path -> switching to Library tab -> add all .jars and src.zip

JavaFX .JAR file won’t run on ubuntu 20.04 from terminal

I’m trying to build my javafx program into a .jar file. The program runs fine when i’m running it from intelliJ but won’t run from .jar file. I’m using intelliJ with java11 and javafx version 11. I followed all the instructions correctly to build the project into a .jar file but when i run my program i get some strange

JavaFX no TouchEvents

On my (Windows) Surface Go 2 tablet I’m not able to retrieve any (multitouch) TouchEvents. I tried it with several Java/FX versions. Even with JavaFX 17 (and older versions) no TouchEvents events are generated only mouse events. Is there some sort of configuration parameter needed? Answer I get TouchEvents on Java/JavaFX 16 using a Microsoft SurfaceBook 2 laptop running Windows.

How to force control skin to be created so I can use getParent?

In the following minimal example when the parents of tabs and tabs2 are printing out, they are both null. From this question I’ve come to understand because while the two TabPanes have been added to the SplitPane, because the skin of the TabPanes hasn’t been created yet, getScene and getParent will return null. So the question is, how can I

How show or hide images in condition with javafx

I need help to program a windows based application with JavaFX. I simply want to show or hide some images with if/else condition. what I exactly want is something like this: if x=1 then show image1 if x=2 them show image2 I tried setvisible() and setDisable() methodes to do this, but it doesn’t work. and my .fxml file codes are:

How to setup web url for JavaFX documentation?

I’m trying to use Eclipse 2021-06 (4.20.0) with an OpenJDK implementation by BellSoft, Liberica JDK 16, that has JavaFX included out of the box. So far, everything goes OK except one rather unpleasant flaw. From Eclipse Java Editor, JavaFX documentation doesn’t open in the browser. When I click the “Open attached JavaDoc in a browser” button in the JavaDoc pop-up

Advertisement