javafx

child fxml file not loading to parent fxml

有些话、适合烂在心里 提交于 2019-12-31 07:17:46
问题 hello guys i m new to fxml so please ignore my silly question here are few things which i m try for 2 day but got not success remove white space from table i.e table size should be up to number of available row(number of row varies) when user click on table row(any display value) new fxml file is open in Anchor pane(tableview is displayed) allotted for tableview but i want to display it in main view (where whole thing table and 2 text field and search button behind this main stack i want to

Showing of JavaFX Scene randomly delayed

自闭症网瘾萝莉.ら 提交于 2019-12-31 07:06:13
问题 I have created a JavaFX application (running on Ubuntu, Java(TM) SE Runtime Environment (build 1.8.0_131-b11)) and have made a simple test application: public class DelayedSceneApplication extends Application { @Override public void start(Stage primaryStage) throws Exception { primaryStage.setTitle("Test"); primaryStage.setResizable(false); // Root. BorderPane root = new BorderPane(); Scene scene = new Scene(root); primaryStage.setScene(scene); // Buttons box. HBox buttonBox = new HBox();

Java Fx resizing scene to stage

和自甴很熟 提交于 2019-12-31 07:03:11
问题 I searched but could not find anything close to the problem that I am having with Fx. I am using Java Fx/JDK 8 and having problems with resizing the scene(s). The below code below loads only one screen at a time in scene graph, and switches between the screens. The problem is when I resize the stage. The scene is not being resized with the stage. Nothing fancy in FXML files only anchor pane and a few components.Thanks in advance. public class ScreensFramework extends Application { static

JavaFX distance between two circle and keep updating property

↘锁芯ラ 提交于 2019-12-31 06:57:04
问题 For assignment, I created 2 draggable circle and connect them with line with javaFX. I need add text which calculate distance between two circle (or length of line) and that text need to keep updating when I drag circles, but that's where I stuck Circle circle1 = new Circle(); circle1.setCenterX(40); circle1.setCenterY(40); circle1.setRadius(10); Circle circle2 = new Circle(); circle2.setCenterX(120); circle2.setCenterY(150); circle2.setRadius(10); Line line = new Line (); line.startXProperty

In JavaFX how to add combobox with data in table view

家住魔仙堡 提交于 2019-12-31 05:57:05
问题 I have tried a lot but not able to populate all values in the data base into my combo box table cell. Controller.java public class controller { GetConnection gc = new GetConnection(); PreparedStatement pst; ResultSet rs; Statement st; private ObservableList<Users> datas = FXCollections.observableArrayList(); public controller() { } @FXML private TableView<Users> table; @FXML private TableColumn<Users, String> c1; @FXML private void editable() { List<String> names = new ArrayList<String>();

JavaFX application with an ImageIO call on a thread other than JavaFX Application Thread hangs on Mac OS X

主宰稳场 提交于 2019-12-31 05:46:09
问题 Consider I have a sample JavaFX application which updates its UI with an image read from the application's JAR, and does so in a delayed manner (i.e. the image is painted after the UI is shown): import javafx.application.Application; import javafx.application.Platform; import javafx.embed.swing.SwingFXUtils; import javafx.scene.Node; import javafx.scene.Scene; import javafx.scene.control.Label; import javafx.scene.image.ImageView; import javafx.scene.layout.StackPane; import javafx.stage

Changing individual line chart series color JavaFX

落花浮王杯 提交于 2019-12-31 05:44:07
问题 I have a window that has three different line charts in it. I am trying to set the color of each line chart series individually. Right now I have a css file that has something like this: .default-color0.chart-series-line { -fx-stroke: blue } .default-color1.chart-series-line { -fx-stroke: black } What this does is set the colors of series in each chart. For example, if I have a line chart that has two series, one would be blue, the other would be black. But with this setting, all three charts

How to wait for user's action in JavaFX (in the same stage)

↘锁芯ラ 提交于 2019-12-31 05:41:07
问题 Do you know how to wait for the user's input in a for loop? I don't mean the showAndWait() method, because I am not opening a new dialogue stage for the user. So for example, each round of the for loop should be waiting for the user to push a button before going ahead with the next round. How is it possible? Many thanks! UPDATE: Now it came to my mind, that it would work with a while(buttonNotPressed){} but is it a good solution? I mean the while loop is running in this case as crazy until

Java FX - filling table rows in different colours

半世苍凉 提交于 2019-12-31 05:26:25
问题 I updated my code to show how the whole class look like Still I got some errors can you validate what I need to improve to have it working Mainly the problem is with fillTableView() method private TableCell fillTableView() { clientColumn.setCellFactory(column -> { return new TableCell<CarFx, String>() { @Override protected void updateItem(String item, boolean empty) { super.updateItem(item, empty); setText(empty ? "" : getItem().toString()); setGraphic(null); TableRow<CarFx> currentRow =

JavaFX using Gluon SceneBuilder InvocationTargetException

本小妞迷上赌 提交于 2019-12-31 05:12:11
问题 I was making an application for a buddy of mine and finished the design for the login screen and saved it in eclipse. This is a .fxml file by the way, and it throws an InvocationTargetException whenever I try to run the main method. Here's the stack trace: Exception in Application start method java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect