javafx

Make multiple change firings lead to far fewer actions

好久不见. 提交于 2020-05-17 05:47:07
问题 I have a TextArea in which the user of my app can write things. A ChangeListener is also listening to the StringProperty "text" of this TextArea . Whenever the text content changes, ChangeListener.changed() , among other things, sets a "dirty" BooleanProperty to true on a central app object. Where "dirty" has the sense of "document needs saving". But I've just implemented a thing in my app whereby any time that the "dirty" Property gets set to true triggers a save-file-to-disk action,

How to run a maven java fx project that includes jfoenix using javafx-maven-plugin

允我心安 提交于 2020-05-16 21:58:13
问题 i was trying to create compile my application and create an executable file. as for now i see the best tool to use is javafx-maven-plugin. i couldn't get it to work, so i started with a basic code that is generated when creating a project according to this. https://www.youtube.com/watch?v=4vd-RE0X5Lg https://openjfx.io/openjfx-docs/#maven the basic example works but when i tried the same structure in my code or by simply adding a code that contains jfoenix to it. it cannot run. following line

JavaFX WebView: how to check if form is valid?

我们两清 提交于 2020-05-16 21:51:24
问题 Is there a way to tell if a form is valid from Java? Basically, a method that returns true if all input fields constrains are satisfied and false otherwise. Strangely enough, org.w3c.dom.html.HTMLFormElement doesn't actually have a checkValidity() method. EDIT: Even more strangely, the implementation com.sun.webkit.dom.HTMLFormElementImpl does support the method checkValidity() . Unfortunately, the package com.sun.webkit is not accessible directly and thus the method is unavailable. 回答1: DOM

JavaFX WebView: how to check if form is valid?

若如初见. 提交于 2020-05-16 21:50:49
问题 Is there a way to tell if a form is valid from Java? Basically, a method that returns true if all input fields constrains are satisfied and false otherwise. Strangely enough, org.w3c.dom.html.HTMLFormElement doesn't actually have a checkValidity() method. EDIT: Even more strangely, the implementation com.sun.webkit.dom.HTMLFormElementImpl does support the method checkValidity() . Unfortunately, the package com.sun.webkit is not accessible directly and thus the method is unavailable. 回答1: DOM

JavaFX WebView: how to check if form is valid?

南楼画角 提交于 2020-05-16 21:49:59
问题 Is there a way to tell if a form is valid from Java? Basically, a method that returns true if all input fields constrains are satisfied and false otherwise. Strangely enough, org.w3c.dom.html.HTMLFormElement doesn't actually have a checkValidity() method. EDIT: Even more strangely, the implementation com.sun.webkit.dom.HTMLFormElementImpl does support the method checkValidity() . Unfortunately, the package com.sun.webkit is not accessible directly and thus the method is unavailable. 回答1: DOM

“Error: Could not find or load main class” JavaFX Terminal

一个人想着一个人 提交于 2020-05-15 02:34:47
问题 I'm using the following class from my JavaFX Tutorial: import javafx.application.Application; import javafx.stage.Stage; public class HelloFXApp extends Application { public static void main(String[] args) { // Launch the JavaFX application Application.launch(args); } @Override public void start(Stage stage) { stage.setTitle("Hello JavaFX Application"); stage.show(); } } I'm using Ubuntu and I have the correct path to my .java file in my Terminal.. When I type "javac HelloFXApp.java" it works

Bundling javafx with install4j

£可爱£侵袭症+ 提交于 2020-05-15 01:57:05
问题 I'd like to bundle javafx 2.1 with my install4j installer, I know I can acheive this by manually depending on the specific .dll and .jar files. But I'd like to do this in the same simple manner that I do when bundling the JRE, is there a way of doing this? If not, will this feature be available soon(or at all) ? 回答1: The pre-made Java 7 JRE bundles that are downloadable in the install4j IDE already include JavaFX, so you don't have to do anything. Starting with install4j 8.x, you can choose

How can I add a tooltip to a node that does not implement Control using FXML?

前提是你 提交于 2020-05-14 18:00:45
问题 In JavaFX subclasses of Control have a tooltip property which means that one can declaratively add a Tooltip using FXML thusly: <CheckBox fx:id="someCheckBox" mnemonicParsing="false" text="Do It?"> <tooltip> <Tooltip text="Whether or not to do it."/> </tooltip> </CheckBox> This is possible only because CheckBox is a subclass of Control. However, I would like to be able to add a tooltip to any scene-graph Node using FXML (i.e. without having to programatically add the tooltip using Java). 回答1:

NullPointerException when loading an FXML

自古美人都是妖i 提交于 2020-05-14 02:51:11
问题 I am getting a NullPointerException regarding the location of my FXML. However, this only started to happen after I upgraded my JavaFX version (I need 13 to meet project requirements). My main class: public class Main extends Application { @Override public void start(Stage primaryStage) throws IOException { String path = "/fxml/loginScene.fxml"; Parent root = FXMLLoader.load(getClass().getResource(path)); primaryStage.initStyle(StageStyle.UNDECORATED); Scene scene = new Scene(root);

How to show images in a large frequency in JavaFX?

我的梦境 提交于 2020-05-13 17:49:40
问题 My application generates heatmap images as fast as the CPU can (around 30-60 per second) and I want to display them in a single "live heatmap". In AWT/Swing, I could just paint them into a JPanel which worked like a charm. Recently, I switched to JavaFX and want to achieve the same here; at first, I tried with a Canvas, which was slow but okay-ish but had a severe memory leak problem, causing the application to crash. Now, I tried the ImageView component - which apparently is way too slow as