javafx

How to use arrow buttons to traverse cells in edit mode in TableView

删除回忆录丶 提交于 2020-02-24 14:11:11
问题 I'd like to use the arrow/enter keys to traverse the cells in TableView , however, if I try to implement it in my custom EditCell class, it doesn't seem to work. Is there a way to make this happen? I've tried a listener on the TextField but it doesn't actually start the focus in the actual cell. Here is my code: Tester.java package tester; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.TableCell; import javafx.scene.control.TableColumn; import

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 table row update

点点圈 提交于 2020-02-24 10:44:11
问题 The scenario i am trying to achieve is, Whenever a particular TableCell in a TableRow gets updated , the row color will be changed to red and after 3 seconds the color should be automatically reverted to original. below is MCVE , Main Class import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import javafx.application.Application; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.scene.Scene; import javafx.scene

JavaFX table row update

匆匆过客 提交于 2020-02-24 10:41:02
问题 The scenario i am trying to achieve is, Whenever a particular TableCell in a TableRow gets updated , the row color will be changed to red and after 3 seconds the color should be automatically reverted to original. below is MCVE , Main Class import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import javafx.application.Application; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.scene.Scene; import javafx.scene

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 do I show contents from the password field in javafx using checkbox [duplicate]

拟墨画扇 提交于 2020-02-24 05:15:42
问题 This question already has answers here : How to unmask a JavaFX PasswordField or properly mask a TextField? (5 answers) Closed 18 days ago . Im a student studying java and javafx, how do I show the password in the passwordfield using a checkbox? I am using gluon scenebuilder as my fxml editor 回答1: The duplicate is listed above for the correct but more complicated way of doing this. In this answer, I am showing two examples. One with a CheckBox and the other with the all-seeing eye. The eye is

How do I show contents from the password field in javafx using checkbox [duplicate]

≯℡__Kan透↙ 提交于 2020-02-24 05:11:20
问题 This question already has answers here : How to unmask a JavaFX PasswordField or properly mask a TextField? (5 answers) Closed 18 days ago . Im a student studying java and javafx, how do I show the password in the passwordfield using a checkbox? I am using gluon scenebuilder as my fxml editor 回答1: The duplicate is listed above for the correct but more complicated way of doing this. In this answer, I am showing two examples. One with a CheckBox and the other with the all-seeing eye. The eye is