javafx-8

Adding values to selected javafx ComboBoxTableCell dynamically

[亡魂溺海] 提交于 2020-01-21 08:57:06
问题 I have a TableView with two columns named Product and Brand. A Product can be of different Brands. Eg. TV has different brands like Samsung, Sony etc. I am showing Brands of a Product in ComboBoxes. This is how i am adding a ComboBoxTableCell for my Brand Column. ObservableList<String> catList = FXCollections.observableArrayList(); categoryCol.setCellFactory(t -> { ComboBoxTableCell comboCell = new ComboBoxTableCell(catList); return comboCell; }); contactTable.getColumns().add(categoryCol);

javafx @font-face css error “loadStyleSheetUnprivileged”

时光总嘲笑我的痴心妄想 提交于 2020-01-17 13:59:25
问题 I'm trying to load a custom font in JavaFx css using this method @font-face { font-family: 'Roboto'; src: url('fonts/Roboto-Medium.ttf'); } I've done every thing proper with the correct path but I'm getting this error Nov 28, 2015 4:49:18 PM com.sun.javafx.css.StyleManager loadStylesheetUnPrivileged INFO: Could not load @font-face font [file:/C:/Users/RootUser/Desktop/Java8%20projects/RemoteViewer/out/production/JavaFxApplication/application/fonts/Roboto-Medium.ttf] This is my project

javafx @font-face css error “loadStyleSheetUnprivileged”

梦想的初衷 提交于 2020-01-17 13:59:24
问题 I'm trying to load a custom font in JavaFx css using this method @font-face { font-family: 'Roboto'; src: url('fonts/Roboto-Medium.ttf'); } I've done every thing proper with the correct path but I'm getting this error Nov 28, 2015 4:49:18 PM com.sun.javafx.css.StyleManager loadStylesheetUnPrivileged INFO: Could not load @font-face font [file:/C:/Users/RootUser/Desktop/Java8%20projects/RemoteViewer/out/production/JavaFxApplication/application/fonts/Roboto-Medium.ttf] This is my project

javafx @font-face css error “loadStyleSheetUnprivileged”

匆匆过客 提交于 2020-01-17 13:59:07
问题 I'm trying to load a custom font in JavaFx css using this method @font-face { font-family: 'Roboto'; src: url('fonts/Roboto-Medium.ttf'); } I've done every thing proper with the correct path but I'm getting this error Nov 28, 2015 4:49:18 PM com.sun.javafx.css.StyleManager loadStylesheetUnPrivileged INFO: Could not load @font-face font [file:/C:/Users/RootUser/Desktop/Java8%20projects/RemoteViewer/out/production/JavaFxApplication/application/fonts/Roboto-Medium.ttf] This is my project

How to SetValue Of ComboBox With Given Id Value ?

你。 提交于 2020-01-17 10:45:13
问题 I have tried the code to create a combobox with Id and Value Pair. Now I want to set the value of combobox with the specified Id passed. Example: I want to set the Value of combobox with employee name whose salary is 1400.0 package demo; import javafx.application.Application; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.scene.Scene; import javafx.scene.control.ComboBox; import javafx.scene.layout.StackPane; import javafx.stage.Stage; /** * *

How to SetValue Of ComboBox With Given Id Value ?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-17 10:41:45
问题 I have tried the code to create a combobox with Id and Value Pair. Now I want to set the value of combobox with the specified Id passed. Example: I want to set the Value of combobox with employee name whose salary is 1400.0 package demo; import javafx.application.Application; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.scene.Scene; import javafx.scene.control.ComboBox; import javafx.scene.layout.StackPane; import javafx.stage.Stage; /** * *

Add/Remove by mouse click

牧云@^-^@ 提交于 2020-01-17 05:37:07
问题 I wrote this program which enables the user to add and remove circles in a rectangle, It adds when the user left clicked and removed when he/she right clicked, although its adding works correctly but its removing doesn't work good, for example: when I add four circles and try to remove all of them, some of them doesn't remove and I don't know why,and I'm confused. help please. public class BoundingRectangle extends Application { @Override public void start(Stage primaryStage) { Pane pane =

Change JavaFX Tab-Button orderring of TextFields from “Left to Right” to “Right to Left” by fxml file [duplicate]

[亡魂溺海] 提交于 2020-01-16 18:34:09
问题 This question already has answers here : JavaFX: How to change the focus traversal policy? (9 answers) Closed 4 years ago . Before asking, i should say that the answer of can be found maybe in JavaFX: How to change the focus traversal policy?, but i don't looking for any java code, i would like a way by editing the Fxml file There is a FXML file that has some TextFields in it and i would like to change focus traversal policy of my TextField : I mean, At the beginning of the application the

JavaFX InvocationTargetException FXML [duplicate]

若如初见. 提交于 2020-01-16 18:09:06
问题 This question already has answers here : What is a NullPointerException, and how do I fix it? (12 answers) Closed 3 years ago . When I want to set the Text of a TextField in JavaFX I get this error message: Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1774) at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1657) at com.sun.javafx

@FXML public static vars in javafx? [duplicate]

牧云@^-^@ 提交于 2020-01-16 08:04:33
问题 This question already has an answer here : javafx 8 compatibility issues - FXML static fields (1 answer) Closed 5 years ago . I'm introducing in javafx and i found it very interesting. But I have got a problem that i can't solve. In the simplest case of a Hello World I can't put a @FXML public static var like this: public class FXMLDocumentController implements Initializable { @FXML public static Label label; @FXML private void handleButtonAction(ActionEvent event) { System.out.println("You