javafx

IntelliJ, is it possible to “Make controller” as in NetBeans?

此生再无相见时 提交于 2020-06-13 18:49:28
问题 Does anyone with IntelliJ & NetBeans experience know, if IntelliJ has some similar feature as for NetBeans "Make controller" when right clicking the corresponding FXML file? I think it is pretty important since it updates, if I have added something new (a FXID for example), and if I deleted it and such - and also places it in the correct place by itself. I know you, in Scene Builder, can go to "View -> Show Sample Controller Skeleton" , but this is just not enough automation, especially not

IntelliJ, is it possible to “Make controller” as in NetBeans?

核能气质少年 提交于 2020-06-13 18:48:16
问题 Does anyone with IntelliJ & NetBeans experience know, if IntelliJ has some similar feature as for NetBeans "Make controller" when right clicking the corresponding FXML file? I think it is pretty important since it updates, if I have added something new (a FXID for example), and if I deleted it and such - and also places it in the correct place by itself. I know you, in Scene Builder, can go to "View -> Show Sample Controller Skeleton" , but this is just not enough automation, especially not

JavaFX: Switching between two panes

生来就可爱ヽ(ⅴ<●) 提交于 2020-06-13 09:12:11
问题 I'm developing a "random enemy generator" for a friends D&D board and since I'm practing Java I wanted to try out. I want it to have 2 anchor panels: In the first one you give value to the following attributes of the object Foes: Nombre (name) HP Energia(Energy) Mana Once done, you save those selections and the enemies get included in the generator. You generate the random enemy, with his values and scalating according to your character level. My question is, how I can get from the first to

How to drag a JavaFX node and detect a drop event outside the JavaFX Windows?

自闭症网瘾萝莉.ら 提交于 2020-06-13 05:44:05
问题 I'm implementing a TabPane that can be detached from the JavaFX window. When the tab pane is dragged outside of the window where it came from, I would like a new window to be created and the tab to be placed in that window. I already implemented some methods using drag gestures to drag the tab between existing windows. However, I am not able to receive any mouse events or drag events when the mouse is moved outside of JavaFX scenes. Is this something possible? 回答1: You can listen for a mouse

How to change point size in Scatter Chart?

谁说我不能喝 提交于 2020-06-12 20:32:59
问题 I have this ScatterChart made in JavaFX: How can I set the data points size? I found that it should be done in CSS, but even having the docs, I still cannot figure it out. 回答1: Use .chart-symbol { -fx-background-radius: 10px ; -fx-padding: 10px ; } If you need this to apply just to a specific chart, give the chart an id and use the id in the CSS file: chart.setId("bifurcation-diagram"); #bifurcation-diagram .chart-symbol { -fx-background-radius: 10px ; -fx-padding: 10px ; } SSCCE: import

How to change point size in Scatter Chart?

↘锁芯ラ 提交于 2020-06-12 20:32:35
问题 I have this ScatterChart made in JavaFX: How can I set the data points size? I found that it should be done in CSS, but even having the docs, I still cannot figure it out. 回答1: Use .chart-symbol { -fx-background-radius: 10px ; -fx-padding: 10px ; } If you need this to apply just to a specific chart, give the chart an id and use the id in the CSS file: chart.setId("bifurcation-diagram"); #bifurcation-diagram .chart-symbol { -fx-background-radius: 10px ; -fx-padding: 10px ; } SSCCE: import

Spring application context is null

一笑奈何 提交于 2020-06-12 04:26:05
问题 I am using Spring Boot 1.3.3, with JavaFX. The application successfully launches Splash screen with this(at this point applicationContext is not null) @SpringBootApplication public class PirconApplication extends Application{ @Bean(name = "primaryStage") public Stage getPrimaryStage() { return new Stage(StageStyle.DECORATED); } private ConfigurableApplicationContext applicationContext = null; private static String[] args = null; @Override public void stop() throws Exception { super.stop();

Can't populate JavaFX TableView created in SceneBuilder 2

谁说胖子不能爱 提交于 2020-06-10 06:43:06
问题 I am trying to re-create the table view sample using scene builder 2, but my TableView couldn’t be populated. I defined my table in JavaFx SceneBuilder like so: <?xml version="1.0" encoding="UTF-8"?> <?import java.lang.*?> <?import java.util.*?> <?import javafx.scene.*?> <?import javafx.scene.control.*?> <?import javafx.scene.layout.*?> <AnchorPane id="AnchorPane" prefHeight="380.0" prefWidth="462.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8" fx:controller=

Make a JavaFX application wait between an animation

自闭症网瘾萝莉.ら 提交于 2020-06-09 05:24:06
问题 I am working on a simple game using JavaFX. What I want here is that at the end of the loop, the application waits for a specified period of time, and then runs again. When I run this code on the application thread, the view doesn't get updated and the Nodes disappear without me seeing the animation. If I create a new thread, then nothing happens at all. Since this animation isn't run until the game has been completed, it doesn't matter if nothing else works until the animation is completed.

About PauseTransition in javafx

江枫思渺然 提交于 2020-06-09 05:19:06
问题 I created a VBox (root) and added some Button in it. When I click the button with text "Click" (button_to_click), ten other button (an button array with ten elements) will change background color into 'red'. I want per button change its backgr color per second. I used PauseTransition to do this but it didn't work. Here are my code package sample; import javafx.animation.PauseTransition; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.layout.VBox; import