javafx-8

Root hasn't been set Error with Java 8 Eclipse

你。 提交于 2019-12-06 17:09:32
问题 Recently I installed Java 8 build 124 for my JavaFX application and I started getting these errors: javafx.fxml.LoadException: Root hasn't been set. Use method setRoot() before load. /Users/jonathan/Projects/Dominion/target/classes/dominion/application/controller/main_overview_tab.fxml:13 at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2613) at javafx.fxml.FXMLLoader.access$100(FXMLLoader.java:104) at javafx.fxml.FXMLLoader$RootElement.constructValue(FXMLLoader.java:1320) at

Custom palette in the ColorPicker

青春壹個敷衍的年華 提交于 2019-12-06 16:48:31
I would like to change the color palette. The colors are by default have a transparency of 30%. Is it possible to replace the color palette? José Pereda Based on this solution , you can replace the color palette once you get the rectangles and their colors. For instance, you can make brighter all the palette: @Override public void start(Stage primaryStage) { ColorPicker picker = new ColorPicker(); StackPane root = new StackPane(picker); Scene scene = new Scene(root, 500, 400); primaryStage.setScene(scene); primaryStage.show(); picker.showingProperty().addListener((obs,b,b1)->{ if(b1){

JavaFX: Tested/confirmed hardware (GPU) acceleration on Linux

馋奶兔 提交于 2019-12-06 16:10:45
问题 I would like to know if anyone managed to get a working version of JavaFX 2.2 or 8 on Linux with hardware acceleration. Oracle provides a list of compatible GPUs: http://www.oracle.com/technetwork/java/javafx/downloads/supportedconfigurations-1506746.html But last time I've tried with a modern nVIDIA card and Ubuntu it reverted to software rendering. 回答1: Ubuntu 12.04 and nVidia GTX 750 Ti (Official drivers): www@www-MS-7577:~$ java -Dprism.verbose=true -jar JavaFXApp.jar Prism pipeline init

How to render 3D graphics properly

一笑奈何 提交于 2019-12-06 15:39:58
I was trying to make a rubiks cube in javafx an ended up with a very bad model as given in this Image . I am giving my source for code for this, where I have used RectangleBuilder class to create rectangles and transformed in 3d. To fix the graphics i had also tried to build the rectangles used TriangleMesh class and after adding materials to them, transformed them in 3d to end up again in the same bad graphics. Why does this occur and how to get rid of it ? import javafx.scene.transform.Rotate; import javafx.scene.PerspectiveCamera; import javafx.scene.transform.Translate; import javafx

How to disable hiding of combobox popup in JavaFX8?

半城伤御伤魂 提交于 2019-12-06 15:29:16
Is there a way to constantly show combobox popup? The question was about datepicker, but it is a descendant of combobox. I want to call show() method of combobox and then constantly show it until stage is closed. The best thing that it got till now is showingProperty().addListener({ ov, old, newValue -> if (!newValue) this.show() }) It kinda works, but it hides popup and then shows it, and that is inconvinient. The bad solution Take the popup content out of the date picker skin and use it like any other node. Note that the date picker itself must have been rendered as part of the scene at

Remove rectangle from Progress Indicator

别等时光非礼了梦想. 提交于 2019-12-06 15:26:56
I tested Progress Indicator in Java 8u40. I get this visual result when I tried to make simple example. Do you know how I can remove the rectangle borders? this works for me with no border or other problems (JDK 1.8.0_20ea): stage.setWidth(100); stage.setHeight(100); BorderPane root = new BorderPane(); ProgressIndicator progress = new ProgressIndicator(); progress.setMaxWidth(50); progress.setMaxHeight(50); root.setCenter(progress); stage.setScene(new Scene(root)); stage.show(); Is this maybe a bug in 8u40? Apply the CSS -fx-box-border: transparent; to the progress indicator. 来源: https:/

JavaFX 3-D Bar chart with Java 8

情到浓时终转凉″ 提交于 2019-12-06 14:12:47
Is there any example of 3-D Bar chart for the latest Java 8 which uses the modern 3-D API? I would like to use the 3-D API from Java 8. Refer to this example, it shows use of 3-D bar chart if it helps you. http://www.jroller.com/dgilbert/entry/creating_3d_charts_in_java Roland There was a 3d-Bar-Chart demo in the earlier versions of JavaFX, but that was removed. You can create a bar chart yourself. Just create a grid and some boxes on it. Here's a slight modification of the answer in How to create a 3d / surface chart with JavaFX . Drag around via mouse, use mouse wheel to zoom. import java

JavaFX custom MasterDetail pane

徘徊边缘 提交于 2019-12-06 13:37:29
问题 I have created a custom Master-Detail pane for my project, where i use a split pane, in each i have two Anchor Panes. In one there is a TableView filled with Users (ObservableList). On each row (User) i have implemented a ChangeListener table.getSelectionModel().selectedItemProperty().addListener(listElementChangeListener()); when the row is selected, i pass the UserObject for my DetailPane, and visualize User data in TextFields as detail. I have implemented controls, to understand if the

JavaFX title bar RTL not supported?

大城市里の小女人 提交于 2019-12-06 13:37:24
问题 I cant seem to find a way of making the title bar of my window be RTL. I can make the inner nodes RTL by changing the node orientation property, but not the title bar. So I get a really weird looking app where everything is RTL except the title bar. How can I fix this? 回答1: You need to invoke setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT) on the scene before showing the stage primaryStage.show() : public class Main extends Application { @Override public void start(Stage primaryStage)

Creating a control seems to break transparent stages on JFX8

我们两清 提交于 2019-12-06 13:33:28
The above program should create a transparent stage with some text, but the stage appears opaque: public class Test extends Application { @Override public void start(Stage primaryStage) { new TextArea(); //Comment this out to enable transparency Stage stage = new Stage(); stage.initStyle(StageStyle.TRANSPARENT); Text text = new Text("Is this transparent?"); VBox box = new VBox(); box.getChildren().add(text); final Scene scene = new Scene(box, 300, 250); scene.setFill(null); stage.setScene(scene); stage.show(); } } The new TextArea() line is what breaks things - comment that out and it all