Questions tagged [fxml]
a scriptable XML-based language that provides the structure for building a JavaFX user interface separate from the application logic of your code.
3,591
questions
0
votes
1
answer
30
views
JavaFX: Null Pointer Exception when Setting TextArea Content in Second Window from First Window
I am using JavaFX and creating two window application one to browse a file and the other to show its content
the Problem is that I am getting null pointer exception when I acssess inputText.setText(...
0
votes
0
answers
37
views
Window functions missing
The minimise, maximise and close buttons at the top right of my "home page" window are missing, and the window cannot be click-and-dragged. I've tried re-writing a few ways but I'm at a ...
0
votes
0
answers
39
views
Cant create new fxml file [closed]
Unable to set path in package root or choose package location when creating a new XML file. The dialog box for file creation lacks the option to browse and select the desired package, restricting ...
0
votes
0
answers
21
views
I want to create a class Index to control the home page but failed [duplicate]
I am trying to use javafx in the eclipse to make a small game
However,during achieveing the home page I met problems
Below is my code in the class Index
public class Director {
public static ...
-2
votes
0
answers
38
views
Model class data to show in textfield javafx [duplicate]
I have a model class that I created that has test data and creates a new friend based on a friend model class.
I have an interface that has friend first name, friend last name and friend address as a ...
0
votes
2
answers
48
views
JavaFX styles gets destroyed and shows errors in Raspberry PI 3, but works well in windows and kali linux
I'm worked with JavaFX in windows, then I shift to linux to make GUI for raspberry pi, cause raspberry pi also uses linux. So the error probability should be less. But
When I run the jar file in Kali ...
0
votes
0
answers
51
views
Drag, Drop and Move Around Images
I'm creating an interface that allows users to drag an image from outside the program and drop it into an imageview within a gridpane.
Currently, the interface is able to handle drag and drop photos, ...
0
votes
1
answer
83
views
Problem with "java.lang.reflect.InvocationTargetException"
I am very new to this and I have a problem with this message that I get every time I try to run a program. I've tried a thousand things and I don't know what else to do. If anyone could help me I ...
0
votes
1
answer
100
views
How to Implement Decorator Design Pattern in JavaFX Controllers?
I'm working on a JavaFX project and would like to apply the decorator design pattern to my controllers to enhance their functionality. Specifically, I want to add additional behavior to existing ...
0
votes
1
answer
43
views
Selecting a TreeItem will display a different scene
I'm creating a stage that displays a TreeTable that has the following TreeItems: Photos, Files and Videos. When a user selects on one of the items I want the scene to change and display either the ...
0
votes
1
answer
52
views
Why is my JavaFX program using fxml getting the error "Caused by: java.lang.ClassNotFoundException: javafx.scene.control.VBox"?
I have a program that was created with java swing, but I hit a point where using it without much online help with issues I ran into so I am starting to learn JavaFX and using fxml for the gui, so I ...
0
votes
1
answer
84
views
Updating TableView from another FXML/Controller
I've created an FXML file that allows users to see if a patient has a surgery listed in a TableView and also has the ability to add in a new surgery. To add in a new surgery the user right clicks on ...
0
votes
0
answers
63
views
JavaFX not updating barChart object data
I seem to be having issues with this piece of code, which is supposed to update the data for a barChart object.
StackOverflow would not let me upload my code, the automatic formatting wouldn't work.
...
-2
votes
1
answer
40
views
How to run a javaFx program [duplicate]
class com.jfoenix.skins.JFXTabPaneSkin (in unnamed module @0x7f6b9ff9) cannot access class com.sun.javafx.scene.control.behavior.TabPaneBehavior (in module javafx.controls) because module javafx....
1
vote
0
answers
16
views
How to switch two ImageViews using an animation in JavaFX
I am coding a simple card game in Java using JavaFXML for the UI. I am using a GridPane to organize the card positions, some cells contain ImageViews ( max 1 per cell ) which contain playing cards ...
0
votes
1
answer
34
views
I'm trying to create a dropdown that will display a user's first name, last name and userId in javafx
I'm creating a javafx/fxml app. I have a dropdown that displays first name, last name and and ID. I want the dropdown to have the headers for each column and also display the data in that appropriate ...
0
votes
1
answer
96
views
Don't work JavaFX textField getter, in another class return value is null
I have 2 classes
first class is controller
public class Controller {
@FXML
private TextField myText;
public TextField getMyText() {
return myText;
}
}
and second class
public ...
0
votes
0
answers
30
views
Save Data on inner FXML left
currently i'm working on a small project.
I have a FXML file which consits of a borderpane. Inside the borderpane there is a Menu on the left side and a inner-fxml file at the center.
img001
Now when ...
1
vote
1
answer
86
views
Is there a way to detect the same event on multiple nodes?
I'm working on a kind of periodic table, there is an event that ultimately, when you hover the mouse, zooms in a little on said element and shows a little more information, the thing is that it doesn'...
0
votes
1
answer
56
views
How to make a MediaView stays at the center of a Pane in my JavaFX MediaPlayer Application?
I am creating a media player using JavaFX (IntelliJ). I put the MediaView inside a Pane(mediaPane) in the center of the BorderPane. I wanted the mediaView to always stick at the center of the Pane, ...
0
votes
0
answers
16
views
String is not a valid type fxml [duplicate]
I am writting this code of a car store for my school project. In this FXML file, I am receiving an error. In the screen I am writting the user can add a car. So it has an option to select if the car ...
0
votes
1
answer
52
views
How to compare fxml files?
I am currently using SceneBuilder to create and modify my fxml files (and as IDE NetBeans 8.2).
I would like to compare two fxmls "side by side" but Scene Builder does not seems to have this ...
0
votes
1
answer
41
views
The "floatingtext" property for MaterialFx is not working properly for me - When rendered the floating text property remains hidden
For example i am using this in my fxml file:
<MFXTextField fx:id="username" floatMode="BORDER" floatingText="username" layoutX="10.0" layoutY="10.0"...
0
votes
1
answer
64
views
How to fix progressBar and Slider to seek at any desired location in my JavaFX MediaPlayer
I am creating a media player using JavaFX(IntelliJ). Now I am using the Slider as a Progressbar so that I can seek at any desired location. Now whenever I run the Application and start the player, the ...
0
votes
2
answers
66
views
JavaFX - transform from disable to enable button
Controller of the father class
this class contains 3 button 'btnSocieta', 'btnUnitaLocali', 'btnReparti'.
The first is enable from default other 2 are disable.
In the stackPane i show the start page ...
0
votes
0
answers
16
views
netbeans not making fxml controllor when i click "make controller" after saving fxml file
I am using netbeans 12 with jdk 1.8 (I can't update because of compatability issues) for a javafx application. After I save my fxml file and click "make controller" nothing happens.
0
votes
0
answers
33
views
Why is the FXML event I'm using in my controller null? [duplicate]
@FXML private static TextField ResponseField;
This is the function the "ResponseField" element is calling
public void GoToResultScreen() throws Exception {
if (Character.toUpperCase(...
0
votes
1
answer
64
views
Failed to load Glass factory class : Keep on Getting this error for Linux and some mac os machine but works fine otherwise
I made a Jar file on Intellij, and I was able to make it run in Windows and some MacOS but not otherwise (so some MacOS and Linux wont work)
What i have done :
Change the javafx version from 17 to 11....
0
votes
1
answer
26
views
JavaFX application unable to launch after I've modelled the FXML with SceneBuilder [duplicate]
Just finished creating a basic UI on SceneBuilder and saved the FXML onto Java, but now whenever I launch the application [HelloApplication] it gives an error about fxml location not being set
Is this ...
0
votes
0
answers
51
views
FXML file is not being reached
I want to load a GUI using a fxml file. However after multiple attempts into fixing it, it keeps returning that the file is not found and/or that it is null. I have tried to place the file within my ...
0
votes
0
answers
30
views
Pre-Populate TableView Data Into an FXML Window
The basis of this is: I'm trying to get all of the components in the modify appointments.fxml file to pre-populate the contents of the 'customerTable' tableview into their respective components.
The ...
3
votes
1
answer
45
views
How to Make Table's Horizontal, Vertical corner's Wheel background Color transparent in JavaFx?
Here is the image of the frame. I have highlighted the corners that i want to make transparent.
I am facing the issue in making the corners colors of the table transparent. I don't why it is not ...
1
vote
1
answer
47
views
Modifying JavaFX Scene Loaded via FXML File?
I'm attempting to modify a JavaFX scene, loaded via a FXML file, in the Java code of the application I'm running.
I have the following test FXML file, created with SceneBuilder:
<?xml version="...
0
votes
2
answers
13
views
Intelij Idea - Loading fxml resource from nested directories
I'm having trouble loading the fxml files from my resource views directory.
I can load it normally without the nested directories but would like to solve it this way for more structural organization.
...
0
votes
0
answers
49
views
Javafx problem while creating a simple taskmanager application. The problem lies in MainController class and viewTaskController class i think
So what is happening is when i click on view tasks button it takes me to view tasks scene but does not show any list of tasks.
Main.java
package com.example.task_manager;
import javafx.application....
0
votes
0
answers
28
views
Creating a list or array of nodes in javafx With ID in scene builder
I was working on a project in javafx and scene builder. the project demands 64 squares I create a gridpane that take them. However I need to deal with the rectangles separately so I must create ...
0
votes
1
answer
73
views
How to load array of Labels or other types into fxml scene?
i'm writing simple VBox with complited array of Labels, but i don't understand how to add that array.
List.fxml
<VBox xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/...
2
votes
3
answers
74
views
How To make Table Views in JavaFx Responsive?
I have been trying to make a simple UI, where there is a MenuBar in Top section and 4 Table Views in the Center Section of the BorderLayout. What i want is that these 4 tables should show like a 2by2 ...
-1
votes
1
answer
43
views
Fxweaver unable to load FXML file
I'm trying to load the login page of my project but this error appears every time:
"Caused by: net.rgielen.fxweaver.core.FxLoadException: Unable to load FXML file file:/C:/Users/vinic/smrf/...
0
votes
1
answer
73
views
setting ListViews, FXML controller load order. (JavaFX)
I'm making a mod manager for a game, and I'm running into issues where I'm trying to call methods, but they cant be called because the controllers havent been initialized in time.
I use SceneBuilder ...
0
votes
1
answer
92
views
JavaFX 20 open new windows on same screen
I have a small javafx 20 app that displays a main window (FXML with CSS) which contains a list. A double click of any row will open a new window to edit that row.
The problem is that, if the main ...
-1
votes
3
answers
89
views
JavaFX LineChart Error: "Instances of javafx.scene.chart.LineChart cannot be created by FXML loader. (Java 11, JavaFX 17)
I am in the process of moving my JavaFX project from Java 8 to Java 11, JavaFX 17 for the past week or so. I also moved from Scenebuilder 8.5 to Scenebuilder JavaFX Version: 20.0.1. All in all it has ...
0
votes
1
answer
53
views
:hover not working JavaFX CSS for FontAwesomeIconView
I've got a problem where the :hover CSS option is not working properly.
This is the CSS:
.body:hover {
-fx-background-color: #b8fffd;
}
.exitIcon:hover {
-fx-fill: gray;
}
The body hover ...
0
votes
1
answer
62
views
Cannot invoke "javafx.scene.image.ImageView.setImage(javafx.scene.image.Image)" because "this.Image1" is null
I am using FXML to make this JavaFX program, and I have run into certain errors
I am trying to make the images change after pressing a certain button 3 times, but when I press the button three times ...
0
votes
0
answers
32
views
Trouble with drawing objects in ScalaFX
I am currently working on a snake game with ScalaFX andd this is my first time working with ScalaFX. Currently, I am having troubles with drawing the snake and the food inside a canvas where the snake ...
0
votes
0
answers
25
views
GluonFX:build failing seemingly due to issues with bytebuddy and Spring
I'm building a mobile app with GluonFX and Spring with Maven. Upon trying to build the app, I'm running into the issues below, leading to the build failing.
I'm using the x64 native tools command line ...
0
votes
1
answer
60
views
Changing scale for ImageView
I have a problem with setting scaleX on ImageView. Here is a part of my code:
bgImage.widthProperty().addListener((observable, oldValue, newValue) -> {
double n = newValue.doubleValue() ...
0
votes
2
answers
79
views
JavaFX - Collapsing VBox
I have a VBox containing MFXToggleButtons. I want to collapse and expand this VBox in height so that it disappears completely. Having thus made a settings window that, when expanded, moves other ...
2
votes
1
answer
66
views
SceneBuilder cannot open FXML file that uses JFoenix elements
While trying to open FXML file in SceneBuilder, exception is thrown. Is there a way to fix this?
Java:
11.0.19 2023-04-18 LTS
SceneBuilder:
Version 20.0.0
Date: 2023-05-08 14:08:52
JavaFX Version: 20....
0
votes
0
answers
34
views
Gluon SceneBuilder NavigationDrawer feature seems to be broken?
I'm currently working on a mobile app with gluonFx, and I'm looking to implement a navigation drawer in SceneBuilder. Every time I try, I get the result that is in the screenshot I've attached. Any ...