javafx-2

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);

Replace a node at (row,col) in a JavaFX GridPane

半世苍凉 提交于 2020-01-21 04:54:29
问题 I am making a grid-style game/simulation based on bugs "sensing" and eating food. I am using a gridPane (called worldGrid ) of labels to show the grid of bugs and food. This is obviously going to be constantly updated when a bug moves cells towards food etc. I currently have a function updateGrid(int col, int row, String cellContent) which I want to replace the label at [row,col] with a label that has the new text in cellContent. I have the follow which works worldGrid.add(new Label

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

Tableview javaFX - The type of getColumns() is eroneous

给你一囗甜甜゛ 提交于 2020-01-17 12:24:49
问题 I have a problem with a getColumns error I simply can't figure out myself. I have searched the internet with no luck. I hope some of you have a great answer for this! Because I am stuck... I have created a Create Member scene where I want to store the information in a TableView after it has been created. I have made a class called Person which makes the getters and setters. In my TableView class I have made a TableView ArrayList which should hold the objects, but with NO luck! The code is

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; /** * *

Edit the values of the TableView from TextField

六月ゝ 毕业季﹏ 提交于 2020-01-16 19:15:44
问题 Hi I am trying in the spirit of the example in http://code.makery.ch/java/javafx-2-tutorial-intro/ to make a similar application where the TableView values can be edited by a series of TextField s instead of a popup form. The reason why I would wannt do it like that is that I am having many fields in a similar application I want to develop and I would like to avoid the user editing them on the TableView The TableView shows a list of Persons where for each I record name, surname and country. I

Hide the title of a TitledPane in JavaFX 2.2

会有一股神秘感。 提交于 2020-01-16 11:57:29
问题 A TitledPane features a title. Here is how a couple of them can look: The titles are "More..", "Smileys" and "Send". I want to completely hide the Send title, not just remove the text "Send". The end result should be something like this: Is it possible? 回答1: I would just use a standard Pane for the third content area rather than a TitledPane and apply the relevant styles to trick JavaFX into styling the bottom panel as if it was the content area of a TitlePane . Roughly speaking you will