javafx-8

consistent setMember on JavaFX window

我们两清 提交于 2020-02-24 11:34:08
问题 I'm trying to use a webview in a JavaFX based UI. The content of webview has to be changed by calling its .load(...) method whenever some actions happen. after each load, I have to set some different values on the window object in webview. These values are then used in an JavaScript code which is run on ready event of document using jQuery: $(document).ready(function() { // here I use values set on window to populate/manipulate HTML elements }); I'm following Oracle's guide to get window

JavaFX 8 : Iterate through TableView cells and get graphics

笑着哭i 提交于 2020-02-24 10:09:58
问题 I'm having troubles accessing the objects displayed in the TableColumn Here's the code snippet where I set the graphics of one Column. Only want to show the Name of the Person object: (Any better/easier way in doing that is welcome) ownerColumn .setCellFactory(new Callback<TableColumn<Site, Person>, TableCell<Site, Person>>() { @Override public TableCell<Site, Person> call( TableColumn<Site, Person> param) { TableCell<Site, Person> ownerCell = new TableCell<Site, Person>() { @Override

JavaFX 8 : Iterate through TableView cells and get graphics

↘锁芯ラ 提交于 2020-02-24 10:05:31
问题 I'm having troubles accessing the objects displayed in the TableColumn Here's the code snippet where I set the graphics of one Column. Only want to show the Name of the Person object: (Any better/easier way in doing that is welcome) ownerColumn .setCellFactory(new Callback<TableColumn<Site, Person>, TableCell<Site, Person>>() { @Override public TableCell<Site, Person> call( TableColumn<Site, Person> param) { TableCell<Site, Person> ownerCell = new TableCell<Site, Person>() { @Override

javafx resource cannot be loaded when running from jar

陌路散爱 提交于 2020-02-24 09:23:05
问题 The application runs well when I attempt to run with the IntelliJ IDEA build and run button. But after I have build the project into an executable javafx jar artifact and attempted to run from the commandline with java -jar AppName.jar it shows the following error : Exception in Application start method java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at

JavaFX ContextMenu accelerator firing from wrong tab

我的未来我决定 提交于 2020-02-24 05:36:46
问题 I have a TabPane with two tabs, each with a TableView which has a context menu. The two context menus have duplicate accelerators, but I expect only the currently selected tab to respond. But what happens is only the last added Tab seems to get the event, even if it's not selected. Below is a complete sample code: package sample; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.*; import javafx.scene.input.KeyCombination; import javafx.stage.Stage;

How to reference android.jar in Gluon Project

丶灬走出姿态 提交于 2020-02-24 05:15:47
问题 Above is my Gluon project to deploy JavaFX on Android. My problem is that I cant reference the android.jar. How to resolve this? build.gradle buildscript { repositories { jcenter() } dependencies { classpath 'org.javafxports:jfxmobile-plugin:1.0.0-b9' } } apply plugin: 'org.javafxports.jfxmobile' repositories { jcenter() } mainClassName = 'com.raes.Main' jfxmobile { android { manifest = 'src/android/AndroidManifest.xml' } ios { infoPList = file('src/ios/Default-Info.plist') } } 回答1: When you

new Thread, application still running after Stage-close

梦想的初衷 提交于 2020-02-14 18:54:07
问题 So I followed this tutorial: https://www.youtube.com/watch?v=gyyj57O0FVI and I made exactly the same code in javafx8. public class CountdownController implements Initializable{ @FXML private Label labTime; @Override public void initialize(URL location, ResourceBundle resources) { new Thread(){ public void run(){ while(true){ Calendar calendar = new GregorianCalendar(); int hour = calendar.get(Calendar.HOUR); int minute = calendar.get(Calendar.MINUTE); int second = calendar.get(Calendar.SECOND

new Thread, application still running after Stage-close

邮差的信 提交于 2020-02-14 18:52:57
问题 So I followed this tutorial: https://www.youtube.com/watch?v=gyyj57O0FVI and I made exactly the same code in javafx8. public class CountdownController implements Initializable{ @FXML private Label labTime; @Override public void initialize(URL location, ResourceBundle resources) { new Thread(){ public void run(){ while(true){ Calendar calendar = new GregorianCalendar(); int hour = calendar.get(Calendar.HOUR); int minute = calendar.get(Calendar.MINUTE); int second = calendar.get(Calendar.SECOND

new Thread, application still running after Stage-close

天涯浪子 提交于 2020-02-14 18:52:38
问题 So I followed this tutorial: https://www.youtube.com/watch?v=gyyj57O0FVI and I made exactly the same code in javafx8. public class CountdownController implements Initializable{ @FXML private Label labTime; @Override public void initialize(URL location, ResourceBundle resources) { new Thread(){ public void run(){ while(true){ Calendar calendar = new GregorianCalendar(); int hour = calendar.get(Calendar.HOUR); int minute = calendar.get(Calendar.MINUTE); int second = calendar.get(Calendar.SECOND

new Thread, application still running after Stage-close

孤人 提交于 2020-02-14 18:52:17
问题 So I followed this tutorial: https://www.youtube.com/watch?v=gyyj57O0FVI and I made exactly the same code in javafx8. public class CountdownController implements Initializable{ @FXML private Label labTime; @Override public void initialize(URL location, ResourceBundle resources) { new Thread(){ public void run(){ while(true){ Calendar calendar = new GregorianCalendar(); int hour = calendar.get(Calendar.HOUR); int minute = calendar.get(Calendar.MINUTE); int second = calendar.get(Calendar.SECOND