javafx-8

JavaFX coordinate system defaults to YUp

[亡魂溺海] 提交于 2020-01-05 05:50:15
问题 In my JavaFX Application, I use SceneBuilder by Gluon. The preview for the scene has a coordinate system of Y Down (Y increases downwards). However, when I import the fxml file into Java, the coordinates are all flipped. Here are the relevant screenshots. Here is the Java export: And here is the SceneBuilder preview: From what I have gathered from extensive Googling, the JavaFX coordinate system should be Y-Down, not Y-Up. Is there something wrong with my version of JavaFX? I'm on Mac OS X 10

JavaFX 8 filtered ComboBox throws IndexOutOfBoundsException when popup clicked [duplicate]

匆匆过客 提交于 2020-01-05 04:52:49
问题 This question already has answers here : How to avoid ArrayIndexOutOfBoundsException or IndexOutOfBoundsException? [duplicate] (2 answers) Closed 3 years ago . I am running Java 8u102. I have a modal window that contains a Combobox whose items are a FilteredList created from a list of Strings. The ComboBox is editable so that the user can enter text (automatically converted to uppercase). The items in the ComboBox popup are then filtered such that only those items that start with the entered

First call to JavaFx Stage::setY inconsistent on Linux - workaround?

↘锁芯ラ 提交于 2020-01-05 04:28:10
问题 When I run the following program, there is a 50% chance that the first click on the button will result in the Window being moved about 10 pixels below (using Ubuntu linux, Oracle JDK 1.8, JavaFx 8.0.102-b14). After that, each click correctly results in a small upwards shift. import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.layout.StackPane; import javafx.stage.Stage; public class JavaFxTest extends Application {

JavaFX application throws NullPointerException at startup

余生颓废 提交于 2020-01-04 17:42:07
问题 UPDATE: The same problem occurs even if I remove the call to the FXMLLoader class. The exception is thrown even with an empty start() method. The problem isn't related at all to the directory tree structure. For every JavaFX project I start, I always have the issue of NullPointerException s being thrown at startup. This happens even with the most basic code needed to even show a stage. I can replicate the issue with the following code: Main.java import javafx.application.Application; import

wrap content in JavaFX

末鹿安然 提交于 2020-01-04 13:35:10
问题 package example; import javafx.application.Application; import javafx.geometry.Pos; import javafx.scene.Scene; import javafx.scene.layout.BorderPane; import javafx.scene.layout.StackPane; import javafx.scene.layout.VBox; import javafx.scene.text.Text; import javafx.stage.Stage; public class Main extends Application { @Override public void start(Stage primaryStage) { Text text = new Text("This is a Text"); VBox box = new VBox(); box.setAlignment(Pos.CENTER); box.setStyle("-fx-background-color:

JavaFX Virtual Keyboard doesn't show

↘锁芯ラ 提交于 2020-01-04 09:57:25
问题 I'm new to javafx. I made a simple app form. It has Anchor Pane Pane Text field I run that app on touch screen device, but the virtual keyboard doesn't show up. The textfield already focused. I'm using JDK 8u25, scene builder 2.0. According to what I read, http://docs.oracle.com/javase/8/javafx/user-interface-tutorial/embed.htm The virtual keyboard is shown automatically when a text input field is in focus. Note that the control that is associated with the keyboard remains visible when the

JavaFX Virtual Keyboard doesn't show

北城以北 提交于 2020-01-04 09:56:46
问题 I'm new to javafx. I made a simple app form. It has Anchor Pane Pane Text field I run that app on touch screen device, but the virtual keyboard doesn't show up. The textfield already focused. I'm using JDK 8u25, scene builder 2.0. According to what I read, http://docs.oracle.com/javase/8/javafx/user-interface-tutorial/embed.htm The virtual keyboard is shown automatically when a text input field is in focus. Note that the control that is associated with the keyboard remains visible when the

JavaFX Virtual Keyboard doesn't show

半城伤御伤魂 提交于 2020-01-04 09:56:26
问题 I'm new to javafx. I made a simple app form. It has Anchor Pane Pane Text field I run that app on touch screen device, but the virtual keyboard doesn't show up. The textfield already focused. I'm using JDK 8u25, scene builder 2.0. According to what I read, http://docs.oracle.com/javase/8/javafx/user-interface-tutorial/embed.htm The virtual keyboard is shown automatically when a text input field is in focus. Note that the control that is associated with the keyboard remains visible when the

registering changelistener to group of nodes in javafx

孤者浪人 提交于 2020-01-04 06:25:15
问题 Is there any way to add a changelistener to group of nodes for following changes? For example, we can add a changelistener to a tabpane for getting tabselectedproperty. I want to add changelistener a to a group of buttons for getting buttonActionedProperty! I want to get old button and new button.... Is there any way to do this? 回答1: When you compare the tabs in a tab pane to a collection of buttons, you're not really comparing like to like. A tab pane naturally has a sense of which tab is

How to Use JavaFX CheckBoxTreeTableCell?

泪湿孤枕 提交于 2020-01-04 05:53:12
问题 I have been trying to use the cell factories that are provided by the JavaFX CheckBoxTreeTableCell , but I can't figure out how to make it work. The Javadoc does not seem to match the implementation. For example: public static <S,T> Callback<TreeTableColumn<S,T>,TreeTableCell<S,T>> forTreeTableColumn(Callback< Integer ,ObservableValue<Boolean>> getSelectedProperty) ... Parameters: getSelectedProperty - A Callback that, given an object of type TreeTableColumn<S,T> , will return an