javafx

JavaFX - How to create SnapShot/Screenshot of (invisble) WebView

好久不见. 提交于 2021-02-06 10:24:29
问题 I want to create a SnapShot/Screenshot/Image from a WebView in JavaFX(8). This WebView does not need to be visible (in my case). My question: Is it possible (in any way), to create a Screenshot/Image from a WebView, when the WebView is not visible (or not added to any visible container) ? See my example code, when WebView (or it's parent ScrollPane) is visible=false , the Screenshot won't work (respectively is emtpy/blank ). Example code: package test; import javafx.animation.KeyFrame; import

JavaFX - How to create SnapShot/Screenshot of (invisble) WebView

微笑、不失礼 提交于 2021-02-06 10:23:09
问题 I want to create a SnapShot/Screenshot/Image from a WebView in JavaFX(8). This WebView does not need to be visible (in my case). My question: Is it possible (in any way), to create a Screenshot/Image from a WebView, when the WebView is not visible (or not added to any visible container) ? See my example code, when WebView (or it's parent ScrollPane) is visible=false , the Screenshot won't work (respectively is emtpy/blank ). Example code: package test; import javafx.animation.KeyFrame; import

JavaFX - How to create SnapShot/Screenshot of (invisble) WebView

青春壹個敷衍的年華 提交于 2021-02-06 10:23:02
问题 I want to create a SnapShot/Screenshot/Image from a WebView in JavaFX(8). This WebView does not need to be visible (in my case). My question: Is it possible (in any way), to create a Screenshot/Image from a WebView, when the WebView is not visible (or not added to any visible container) ? See my example code, when WebView (or it's parent ScrollPane) is visible=false , the Screenshot won't work (respectively is emtpy/blank ). Example code: package test; import javafx.animation.KeyFrame; import

How to make a Text content disappear after some time in JavaFX?

岁酱吖の 提交于 2021-02-06 09:31:13
问题 b1.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent e) { try { Class.forName("com.mysql.jdbc.Driver"); connect = DriverManager .getConnection("jdbc:mysql://localhost:3306/project?" + "user=root&password=virus"); statement = connect.createStatement(); preparedStatement = connect .prepareStatement("select * from mark where clsnum = " + txt1.getText() + ""); rs = preparedStatement.executeQuery(); if (rs.next()) { delete(); } else { msg.setText("Student Not

Detect when stage again in focus and scene is loaded

↘锁芯ラ 提交于 2021-02-05 11:46:37
问题 I have a parent stage, on top of which popup can be shown. Here is code: private static Stage chooseBreedStage; static { chooseBreedStage = new Stage(); chooseBreedStage.setTitle("Choose breed"); chooseBreedStage.initOwner(AppKitty.getStage()); chooseBreedStage.initModality(Modality.WINDOW_MODAL); chooseBreedStage.setScene(SceneManager.getInstance().getScene(SceneEnum.CHOOSE_BREED_SCREEN)); } public void showChooseBreedPopup() { chooseBreedStage.showAndWait(); } Before I show popup, I blur

How to Fix NoClassDefFoundError in JavaFX?

情到浓时终转凉″ 提交于 2021-02-05 11:29:33
问题 I'm trying to build a small user interface using JavaFX, But I'm getting an error like this: Error: Could not find or load main class myApp Caused by: java.lang.NoClassDefFoundError: javafx/application/Application This is my code: and im using jdk 12.0.2 import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.paint.Color; import javafx.stage.Stage; public class myApp extends Application{ public static void main(String[] args) {

JavaFX Thread freeze

时间秒杀一切 提交于 2021-02-05 10:49:50
问题 I'm currently working on a JavaFX project. On GUI initialization I want to read some infos out of a HTML document using Selenium and FirefoxDriver. Normally I would use a crawler to get the infos but this document is full of JavaScript so I was only able to get to the infos using Selenium (I know, it's really bad). Now I've got the problem that this process takes up to 15 seconds and I want to show the progress of Selenium on a JavaFX progress bar. So I've set up a Thread doing all the work

IllegalAccessError while using FXMLLoader

浪尽此生 提交于 2021-02-05 09:26:09
问题 I am trying to load an FXML file into my javafx application as my root widget, I am using windows 8.1 with java 11.04 and javafx-sdk 13 with the Eclipse 2019 IDE. I searched a little bit on the internet but did not find anything. my situation is a bit complicated, because javafx is not available on java 11, so I installed it by myself which took a lot of time to figure out how to. This is the code that I am trying to run : package application; import java.io.IOException; import javafx

textfield & combobox problem in javafx android

三世轮回 提交于 2021-02-05 07:01:08
问题 I am having problem in simple javafx android app. The problem is that i build very simple app with some text-fields and combobox in netbeans ide using gradle javafxmobile-plugin. I run the app in android the textfield and combobox causes problem in android mobile . The problem is that when i typed from keyboard in android nothing changes in text-field until i press space button, or choose suggestion in keyboard upper area. Also when i type some text in text-field and switch another then the

How to Enable or Disable the buttons in JavaFX form?

一笑奈何 提交于 2021-02-05 06:37:05
问题 I am working on my project and there are some buttons that I wanted to disable at the time of running. So I disabled them but How can I enable them back when I wanted to.?? Because there is no setEnable() property. Please tell me how can I enable the buttons? 回答1: You are looking for the disableProperty: Defines the individual disabled state of this Node. Setting disable to true will cause this Node and any subnodes to become disabled. This property should be used only to set the disabled