javafx

Event on ComBox which inside TableView cell JavaFx?

夙愿已清 提交于 2020-04-06 18:41:26
问题 I have TableView and when my program start TableView has only one row, also I have ArrayList of ComboBoxes and create one ComboBox for each row in the TableView, when user edit (Product Name) cell (which should contain the ComboBox on it) program create ComboBox for this cell and set the ComboBox as cell graphic (when ComboBox created not removed from cell graphic), and when the user select item from the last row ComboBox the program must create one row, the program behave correctly for the

JavaFX strange rendering on Windows 7

泪湿孤枕 提交于 2020-03-28 06:56:08
问题 I have just started working with JavaFX and have come to an obstacle. When I open SceneBuilder it renders very strangely. When the window is restored it seems zoomed in, and when maximized it looks better, but still not quite OK and inoperable. The same goes for HelloWorld example that I created, and examples I found on internet, so I think it is something systemic. I have tried with Java 7u71 and with Java 8u25. No change. Please help if you know how to fix this. 回答1: After reading system

How to pass arguments in JavaFX

和自甴很熟 提交于 2020-03-26 11:03:03
问题 So, it's a little confusing but here is the thing: I created a window with SceneBuilder, and created the controller and everything, there is a button in the window. The button setOnAction() method makes the program open another window, the thing is, this other window is another class and I want to pass information to this other window, but it seems I cannot. Here's some code example: MainWindow: confirm.setOnAction(event->{ try { LibraryWindowController lwc = new LibraryWindowController();

JavaFX Slide out menu

孤人 提交于 2020-03-26 08:24:11
问题 I'm working on a project that needs a slide out menu, preferably on hover it slides out, how would I go about doing this? I want to program the slide out menu in a FXML file. Is there anyway to do this? What would I use(Split Pane, Separators)? Thanks! 回答1: Use a TranslateTransition to move the menu. Use a Pane to place the menu above the normal content. The following example doesn't use fxml for simplicity, but of course you can create the nodes from fxml too: @Override public void start

IntelliJ + Gradle + JavaFX building, but not running

隐身守侯 提交于 2020-03-25 22:00:37
问题 I'm trying to run Gradle project with JavaFX in IntelliJ IDEA Ultimate on Windows. JavaFX was added in our latest Git push, before it was working. I can build project without problems. I'm getting an errror while running main: I have: JDK 11.0.5 (the one from Oracle site, not openJDK), I'm using Java 11, all configured in IntelliJ JDK installation directory (specifically /bin directory in it) added to my PATH JAVA_HOME environment variable added with JDK installation directory Project

How can I stop Gradle deleting .jars from my project's module path?

你。 提交于 2020-03-25 16:56:53
问题 I'm trying to develop a Gradle project which involves JavaFX. Specs: Linux Mint 18.3, Java 11, Eclipse 2019-06, JavaFX: either 13 or 11... A couple of useful answers to questions have helped me over the past hours: this one tells me (with useful clonable example) how to configure things, at least using a Java file to hold my project's main class (in fact I ultimately want to write all my code in Groovy ideally), in order to overcome the error "JavaFX runtime components are missing, and are

display two decimal places of a float in a TableView JavaFx

有些话、适合烂在心里 提交于 2020-03-25 12:32:15
问题 So basically I'm developing this Javafx app following the DAO pattern... and I want the floats to have that .00 end instead of .0 (to represents the balance.. money ) balance records in tableview with .0 here's how I initialized the tableview components idC.setCellValueFactory(cellData -> cellData.getValue().idProperty().asObject()); balanceC.setCellValueFactory(cellData -> cellData.getValue().balanceProperty().asObject()); dateC.setCellValueFactory(cellData -> cellData.getValue()

GridPane.getColumnIndex() returning null

给你一囗甜甜゛ 提交于 2020-03-25 07:54:12
问题 Trying to add children to a GridPane with row and column indices. They show up in the gui, but using GridPane.getColumnIndex(node) always returns null. GridPane grid = new GridPane(); for (int i = 0; i < 20; i++) { for (int j = 0; j < 20; j++) { grid.setGridLinesVisible(true); Button myBtn = new Button("foo"); GridPane.setColumnIndex(myButton,i); GridPane.setRowIndex(myButton,j); grid.getChildren().add(myButton); } When I try to use this algorithm I got from the answer on javafx GridPane

GridPane.getColumnIndex() returning null

情到浓时终转凉″ 提交于 2020-03-25 07:54:10
问题 Trying to add children to a GridPane with row and column indices. They show up in the gui, but using GridPane.getColumnIndex(node) always returns null. GridPane grid = new GridPane(); for (int i = 0; i < 20; i++) { for (int j = 0; j < 20; j++) { grid.setGridLinesVisible(true); Button myBtn = new Button("foo"); GridPane.setColumnIndex(myButton,i); GridPane.setRowIndex(myButton,j); grid.getChildren().add(myButton); } When I try to use this algorithm I got from the answer on javafx GridPane

JavaFX : Mouse events for a PopOver Window (ControlsFX)

你说的曾经没有我的故事 提交于 2020-03-23 07:56:17
问题 I am having the following code to display a PopOver (Custom PopUp by ControlsFX - mvn repo) public class JavaFXApplication35 extends Application { @Override public void start(Stage primaryStage) { try { Label lblName = new Label("Tetsing name"); Label lblStreet = new Label("Some street name"); Label lblCityStateZip = new Label("Some city, 111111"); VBox vBox = new VBox(lblName, lblStreet, lblCityStateZip); PopOver popOver = new PopOver(vBox); Label label = new Label("Mouse mouse over me");