javafx

How do I start again an external JavaFX program? Launch prevents this, even if the JavaFX program ended with Platform.Exit

冷暖自知 提交于 2020-01-14 22:54:02
问题 From my MainProject (Java 8) i starts a JavaFX 8 Class. public void startFX() { if (isRestartPrintModul() == true) { fxMain.init(); } else { setRestartPrintModul(true); fxMain.main(new String[] {"ohne"}); } } This is my FXMain: package quality; import javafx.application.Application; import javafx.application.Platform; import javafx.event.ActionEvent; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.layout.StackPane; import javafx.stage.Modality; import javafx

How do I properly add a MouseHandler to my JFreeChart-FX to drag the chart from left to right

╄→尐↘猪︶ㄣ 提交于 2020-01-14 19:52:09
问题 I managed to create a Candlestick Chart using JFreeChart-FX and display it using the fxgraphics2d API. But I am pretty much confused on how to enable any interaction with my chart and need some help to this. I'd be very grateful for any help in the right direction. I started with this example to get up my initial Chart and altered it so that it uses my data. Then I use a custom Canvas , which utilizes fxgraphics2d to make the JPanel component accessable as a node for my JavaFX applicaiton. So

JavaFX Append to right click menu for TextField

做~自己de王妃 提交于 2020-01-14 17:54:46
问题 When you right click on a TextField there are Undo, Redo, Cut, Copy, Paste, Delete, and Select All options. I want to add a "Register" MenuItem to that list from my controller class, but do not know how. Here is what I got so far: This overwrites the existing menu items: ContextMenu contextMenu = new ContextMenu(); MenuItem register = new MenuItem("Register"); contextMenu.getItems().add(register); charName.setContextMenu(contextMenu); Both of these return null: charName.getContextMenu()

JavaFX Append to right click menu for TextField

主宰稳场 提交于 2020-01-14 17:52:49
问题 When you right click on a TextField there are Undo, Redo, Cut, Copy, Paste, Delete, and Select All options. I want to add a "Register" MenuItem to that list from my controller class, but do not know how. Here is what I got so far: This overwrites the existing menu items: ContextMenu contextMenu = new ContextMenu(); MenuItem register = new MenuItem("Register"); contextMenu.getItems().add(register); charName.setContextMenu(contextMenu); Both of these return null: charName.getContextMenu()

JavaFX Append to right click menu for TextField

情到浓时终转凉″ 提交于 2020-01-14 17:52:11
问题 When you right click on a TextField there are Undo, Redo, Cut, Copy, Paste, Delete, and Select All options. I want to add a "Register" MenuItem to that list from my controller class, but do not know how. Here is what I got so far: This overwrites the existing menu items: ContextMenu contextMenu = new ContextMenu(); MenuItem register = new MenuItem("Register"); contextMenu.getItems().add(register); charName.setContextMenu(contextMenu); Both of these return null: charName.getContextMenu()

Error: JavaFX runtime components are missing - JavaFX 11 and OpenJDK 11 and Eclipse IDE

删除回忆录丶 提交于 2020-01-14 14:35:43
问题 I have this classical issue: Using JavaFX 11 with OpenJDK 11 together with Eclipse IDE. Error: JavaFX runtime components are missing, and are required to run this application I have OpenJDK 11.0.2 dell@dell-pc:~$ java -version openjdk version "11.0.2" 2019-01-15 OpenJDK Runtime Environment 18.9 (build 11.0.2+9) OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode) dell@dell-pc:~$ And I also have JavaFX 11 SDK . By the way! I'm using Lubuntu Linux 18.10 if you wonder. Then I have included

JavaFX - Accelerator not working when textfield has focus

旧巷老猫 提交于 2020-01-14 13:14:14
问题 In my application I have a screen where I use Accelerators. I'm using the function key F3 to execute an operation in my application. It works fine everytime, but when I click in any TextField on this screen the function key doesn't execute. Here is the code where I set the Accelerator: scene.getAccelerators().put( new KeyCodeCombination(KeyCode.F3), new Runnable() { @Override public void run() { // do sth here } } ); When I click my textfield and then hit the F3 function key it doesn't work.

How can I sign and deploy a JavaFX application into a single .JAR?

独自空忆成欢 提交于 2020-01-14 12:44:15
问题 I'm still learning the ins and outs of JavaFX. One major difference is that in the dist folder (in addition to the library) I find besides the .jar file, an HTML file and a JNLP file, neither nor of which is any use to me (this will be a desktop application). I found the following (Properties omitted because of sensitive/irrelevant information): <delete dir="${store.dir}"/> <mkdir dir="${store.dir}"/> <jar destfile="${store.dir}/temp_final.jar" filesetmanifest="skip"> <zipgroupfileset dir=

How can I sign and deploy a JavaFX application into a single .JAR?

巧了我就是萌 提交于 2020-01-14 12:42:50
问题 I'm still learning the ins and outs of JavaFX. One major difference is that in the dist folder (in addition to the library) I find besides the .jar file, an HTML file and a JNLP file, neither nor of which is any use to me (this will be a desktop application). I found the following (Properties omitted because of sensitive/irrelevant information): <delete dir="${store.dir}"/> <mkdir dir="${store.dir}"/> <jar destfile="${store.dir}/temp_final.jar" filesetmanifest="skip"> <zipgroupfileset dir=

how to update progress of the progress bar to show the progress of copying a file

落花浮王杯 提交于 2020-01-14 10:44:05
问题 I want a progress bar to indicate files being copied how to update the progress bar to show the progress of copying a file by combining below lines of code?? here's my code for progressbar. @FXML private void startbtnaction(ActionEvent event) { startbtn.setDisable(true); progressbar.setProgress(0); txt.setText(""); cancelbtn.setDisable(false); copyworker = createWorker(numFiles); progressbar.progressProperty().unbind(); progressbar.progressProperty().bind(copyworker.progressProperty());