scenebuilder

Empty window showing up when running javaFX application, using both graphic view and scenebuilder

只谈情不闲聊 提交于 2019-12-12 03:07:09
问题 I am currently writing a poker game as an assignment for my finals. I have to use a combined view: a class with actual code and the Scenebuilder. I did everything i learned and the model is working just fine. I'm new to this so it must be an easy fix! The professors want us to get familiar with Scenebuilder but they didn't give much of an explanation. As you can see i use a class called pokerView in which I load in every single image of the cards. In the beginning I use a strange forloop to

pop up window removes primary node in javafx

情到浓时终转凉″ 提交于 2019-12-12 02:12:33
问题 I want to create a photo gallery in javafx using pop up window . But when I pass target image to a method to set content of a pop up window to that image primary image will be removed and pop up window will be open.Why?Please help me .Thank's ( Excuse my for my bad English!!! ) This is that snippet code . final Popup popup = new Popup(); popup.getContent().add(image); popup.setOnShown(new EventHandler<WindowEvent>(){ @Override public void handle(WindowEvent t) { image.setFitHeight(400); image

How to make the opened window must close at first before back to the main?

喜欢而已 提交于 2019-12-11 18:08:50
问题 I want to make that second window must close first like alert dialog. what should I add to this code when Button clicked: Parent parent = FXMLLoader.load(getClass().getResource("view/sec_win.fxml")); Stage stage = new Stage(); Scene scene = new Scene(parent); stage.setScene(scene); stage.show(); 回答1: There's a property called stage.initOwner(Stage stg) that allows this to happen. Example: public class JavaFXApplication4 extends Application { @Override public void start(Stage stage) { Button

How do you get a ScrollPane that is placed in the center of a BorderPane to work?

馋奶兔 提交于 2019-12-11 12:04:51
问题 I have a program where i have a rootLayout made from a BorderPane. When i press a button in this rootLayout i place a new fxml view into the center of the the borderPane using .setCenter(). The view i am placing into the borderPane consists of an AnchorPane that has a scrollPane as it's child element and when i run this view by itself the scrolling works. However after placing the view into the borderPane it stops working. The area in the scrollPane doesnt move at all when i scroll down or up

JavaFX: How to move “drop down arrow” in TitledPane to be on right

限于喜欢 提交于 2019-12-11 11:28:51
问题 I hope everyone is doing well. I'm trying to move the drop down arrow in a TitledPane to be laid out on the right, instead of the left like it is by default. I'm using JavaFX 8, and many of the resources I've found don't seem to work. I have found that I am able to move the arrow a specific amount, like 20 pixels shown below .accordion .title > .arrow-button .arrow { -fx-translate-x: 20; } But I want something responsive. Is there some way that I can get the width of the titled pane, and then

On javafx dialog action edit parent stage elements

你说的曾经没有我的故事 提交于 2019-12-11 09:53:42
问题 I have a JavaFX application with two buttons: "Edit" and "Save" and a textfield "textField1". Initially the textfield "textField1" and the "Save" button are disabled (fxml build with scene builder, so editable is set to false over there). When a user clicks the button "Edit" a login dialog pop ups. If the user enters the correct credentials then i want to hide the popup and unlock (editable) both textfield "textField1" and button "Save" so the user could be able to edit textfields value and

A method to algn JavaFX checkbox label text with the text on a line

情到浓时终转凉″ 提交于 2019-12-11 09:50:58
问题 I have a plain CheckBox in an FXML file on the same line as some other controls and labels in a HBox. The checkBox label text-base is about 6px units lower than ALL the other text and labels on the same line (HBox). I can manually line things up in SceneBuilder by specifying a padding-bottom value of: 6 . I wanted to put that into the CSS so all checkbox labels would be "lined-up", but everthing I've tried is ignored and doesn't show in the CSS Analyzer (too). I looked through the Checbox

Back button that will open main Stage in Javafx 2

会有一股神秘感。 提交于 2019-12-11 09:28:57
问题 I have 2 screens in application. First screen(MainController class) which opens with running application from Eclipse. And second screen(SecondController class) which opens on button located in first screen. How can I make some kind of 'Back' button in second screen which will show back first screen? I'm creating the visual part of the application in JavaFX Scene Builder if it matters. 回答1: Here is a small example, containing to screens, to show how you can achieve what you are looking for

Can't add data to table in javaFX

笑着哭i 提交于 2019-12-11 08:39:30
问题 As shown in the following code I tried to add some data I to the table. But when I run the application it only just show the empty table. What is the possible reason to that problem ? package com.fg.transbridge.tool.ui; import java.net.URL; import java.util.ResourceBundle; import javafx.beans.property.SimpleStringProperty; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control

where is located JAR/FXML Manager option in javafx scene builder 1.1?

♀尐吖头ヾ 提交于 2019-12-11 08:36:00
问题 This is what i'm trying to find. This is how my javafx scene builder 1.1 looks like. i have looked into all options but i couldn't figure out. 回答1: I am very intrigued to know why you want to work with Scene Builder 1.1 which dates from 2013. I guess because you have to maintain some legacy JavaFX code with JDK 7? I'd guess as well that you are aware that the current version for Scene Builder can be found here, and it supports JDK 8 and JDK 10. Anyway, back to your question, the bad news is