3,627 questions
0
votes
1
answer
34
views
How to consistently dictate size for nested JavaFX controls?
I'm working on developing my programming skills and am building a UI application in JavaFX because Java is my strongest language.
Unfortunately I've found building the UI tedious at best using FXML. I ...
0
votes
1
answer
60
views
Login and create account buttons don’t work
I created a login screen in Java that has two buttons: Login and CreateAccount. These buttons were working initially, but after I started working on a different screen, they suddenly don't work ...
3
votes
1
answer
97
views
Resizing ComboBox by scaling screen size
I'd like to make my application resizable. I want to resize all child elements and its font size and images depending on the height and width.
I followed the instructions on the following page: Bond ...
1
vote
1
answer
36
views
Error in updating client list in server UI FXML
I'm working on a simple client-server project. The function of it doesn't really matter because I'm having a problem with the client list in my server UI. It uses FXML and has a listView to list the ...
1
vote
1
answer
163
views
Bond Font Size and Image with Thresholds
I'd like to make my application resizable. I want to resize all child elements and its font size and images depending on the height and width. But I do not want that font size and image fall under or ...
0
votes
0
answers
61
views
How do I run my javafx app using fxml on VS code without project manager? I got Exception java.lang.reflect.InvocationTargetException
This the 1st problem scenario:
When I run this program. which is a javafx UI using .fxml. it runs well when I run it using mvn exec: through maven project configuration. but doesn't run on default ....
1
vote
0
answers
41
views
JavaFX stage size too small - Gridpane resizing
I created a JavaFX dialog in SceneBuilder. After playing probably an hour with the different layout attributes I can't find out how to open the stage in way, that all ui elements are properly ...
-1
votes
0
answers
35
views
In FXML, I am trying to scale when I go fullscreen
I want the application, upon entering fullscreen, to first expand the stage and adjust all objects. Only after this, the code should run to get the width of the VBox, as I need this value to determine ...
0
votes
0
answers
42
views
FXMLLoader can't find FXML file after moving it to a different package in NetBeans
I'm working on a JavaFX project using NetBeans, and I've encountered an issue with loading an FXML file. Originally, my VentanaLogin.fxml file was in the practica6.main package, but I moved it to a ...
0
votes
1
answer
112
views
Cannot invoke "javafx.scene.control.Label.setText(String)" because "this.nameLabel" is null
It's my first time here but here goes:
I have a JavaFX application that changes the FXML UI labels dynamically.
I want to pass the details from the MainController class to the interface but I get an ...
0
votes
1
answer
60
views
Problem of getting resource using getResource()
I need to get a resource FXML file in a Java project. Here's my code:
public void start(Stage stage) throws IOException {
try {
// System.out.println(getClass());
URL url = this....
0
votes
1
answer
23
views
How to Introduce flexibility into a JavaFXML TreeTableView
The issue is not being able to introduce sufficient flexibility to render a TreeTableView when the sources of data required for the view are not known before the program is run. My objective is to be ...
0
votes
0
answers
59
views
JavaFX: Buttons NullPointerException When ComboBox is Populated [duplicate]
I'm working on a JavaFX application for a school project, and I've encountered a frustrating issue. The ComboBox in my MainController initializes correctly, but clicking on any of the buttons in the ...
5
votes
1
answer
70
views
Change font of TextField without affecting context menu
Setting a custom font style on a TextField in JavaFX will also affect its default context menu, I noticed. What can I do to change the font of the user input, but keep the menu items in the context ...
5
votes
1
answer
82
views
JavaFX custom control not showing On Action option
Hey all I am needing a hand with the following:
I am trying to add the "On Action" to my custom control I create in Scene Builder 2.0.
I will have a couple of these in my scene so I am ...
2
votes
1
answer
72
views
Transparency issue in javaFx
One of the window my program has, is a TextFlow that is filled by an API, it was working fine with the window being semi-transparent but after some time the amount of information was way beyond the ...
0
votes
1
answer
49
views
How to request focus for a certain field?
I am developing a Login Dialog for a Smart Card Token Management with Certificate System. Below, I added example code to demonstrate the issue. If I start the application I first see a login dialog ...
0
votes
0
answers
86
views
JavaFX: setting list for comboBox does not work
I am working in a JavaFX project. There I have fxml included in other fxml files. Now I need to send data from the outer controller to the inner controller. I've tried it, but the combobox looses its ...
0
votes
0
answers
44
views
How to make VSCode warn me about missing libraries in a .fxml file?
When editing a .fxml file in InteliJ the IDE flags objects that don't have their libraries imported yet with the red underline, letting you simply hover it and import.
I've looked through the features ...
0
votes
0
answers
43
views
JavaFx and Springboot program isn't switching scenes [duplicate]
I've been trying to learn settings up a program using javafx and springboot. I have primarily used github examples to get started with learning how to do this, if there's an easier way please let me ...
0
votes
1
answer
919
views
How do I solve Nashorn removal and JS replacement in Netbeans 22?
Despite having followed every procedure exactly as specified to install an alternative to Nashorn in Netbeans 22, I still get the following error when trying to build a FXML project:
Java 15 has ...
0
votes
1
answer
73
views
Java FXML, change label text, pause GUI for x seconds, then change label text again
I'm currently working on a Pokémon fangame, and I have a problem (not the last).
So here is the thing, since it's a round by round game, I have to do this:
Decide which Pokémon attack first.
Change ...
1
vote
1
answer
83
views
Why doesn't this Kotlin-backed FXML element get initialized or displayed?
I want to write reusable, composable JavaFX/FXML components in Kotlin. I am using Java 21 and my JavaFX is provided by gradle at version 22.0.1
My main class is loading the initial scene in a window ...
3
votes
1
answer
54
views
How to detect 'onMouseMoved' on the entire scene?
I'm trying to detect if mouse is moving over the entire scene or not to close the app after 15min of inactivity.
In the example I have an Anchorpane occupying the entire scene with an OnMouseMoved ...
2
votes
2
answers
150
views
JavaFX Scene Builder: How to set text color in ComboBox?
I created a JavaFX ComboBox with JavaFX Scene Builder 21.0.0.
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene....
3
votes
1
answer
52
views
The issue of using Read-Only List Properties in FXML
I am studying the official FXML documentation and have encountered some issues.
public class FxmlTest extends Application {
public static void main(String[] args) {
launch(args);
}
...
1
vote
1
answer
59
views
Scene builder failing to display custom TableView compiled with Java 17
I'm working on a javafx application so naturally I've had to use Scene Builder to display and manipulate fxml files. Everything seemed to be working fine until I decided to create a custom TableView ...
-1
votes
1
answer
42
views
JavaFX: fxmlloader is recursive, and I keep getting null pointer exceptions on the instance variables in the controller class
This is the class definition of PostView, which is also the controller class for its fxml file. I am trying to make a javaFX social media app for a university assignment (due in a couple hours lol) ...
0
votes
1
answer
55
views
display an image in FXML
I want to display a certain image in javaFX so I am creating it in the FXML file to manipulate it later on in controller.java file but I keep getting errors after errors. this is the lastest one
...
0
votes
0
answers
49
views
How to change Stage settings in a JavaFX program using fxml controllers
I have an application I am working on with a teammate, but we both are not sure how to change our Scene's title and parameters from inside our fxml controllers. This is the solution I tried, but it ...
0
votes
0
answers
61
views
How to make component draggable and connected in Javafx
I am developing a javafx application for network topology. I have one pane where I drag the components from the left pane to the centre pane. Now the problem is sometimes if the pane is cluttered with ...
0
votes
0
answers
39
views
Filling GridPane with nested fxml with specific csv information
I have a fxml file i am currently working on with a GridPane with each of the cell containing anohter fxml component in following manner:
<GridPane hgap="10.0" layoutX="32.0" ...
2
votes
1
answer
100
views
Specifying keyframe animation in FXML
If keyframe animation can be specified in FXML, then a lot of file formats containing animations can be ported to FXML without information loss. I'm aware of the simpler variants like RotateTransition....
0
votes
1
answer
56
views
Infinite loop between "loadScene" and "initialize", causing our FXML file to be loaded over and over again
Background for our application (can be skipped if u dont think it is relevant):
We are creating an application for kids with autism to identify and understanding gestures and facial expressions. We do ...
4
votes
1
answer
60
views
Why isn't my canvas shown in JavaFX Application?
My Professor at university gave this assignment to start a new topic in class. Just a simple GUI which is supposed to show a graph. 3 Files were prepared by our Prof:
Function Canvas
package Aufgabe1....
1
vote
1
answer
113
views
Printing multiple AnchorPanes on their own pages
I have a javafx TabPane that I want to be able to print. The TabPane has two tabs, and I want each tab to be printed on its own page. I created a button on one of the tabs with the onAction function ...
1
vote
0
answers
14
views
Printing a string in a text box using FXML
Im making a weather app in which I am using a weather controller along side scenebuilder to controll actions within the app. I am trying to make a text box display the current temp which I have set to ...
0
votes
2
answers
116
views
Code suggestions not working on IntelliJ IDEA for fxml files
Autocompletion/code suggestions for .fxml files in IntelliJ IDEA are not working.
I tried to open project on other machines with latest IntelliJ IDEA (2024.1), it works. I using IntelliJ IDEA 2022.3.3
2
votes
0
answers
44
views
e(fx)clipse how to disable Warning "JavaFX controller method must have 0 or exactly 1 argument"
e(fx)clipse shows the warning on every function with ChangeListener signature which is annotated with @FXML
@FXML
private void fldMyTextFieldChanged( ObservableValue< ? extends String > ...
0
votes
0
answers
60
views
FXML BorderPane size not changing despite using setMinSize() and setPrefSize() in JavaFX application
I'm facing an issue where the size of my BorderPane in an FXML file (mainLayoutBorderPane) is not changing, remaining at (0,0), despite attempting to set it using setMinSize() or setPrefSize() in a ...
0
votes
0
answers
61
views
JavaFX Charts - NoSuchMethodError on flatMap when trying to add data to a LineChart
I'm trying to create a LineChart in JavaFX and everything works except adding data to the chart. It works when there is no data added to the chart but as soon as I try to add data it gives me a long ...
4
votes
1
answer
92
views
JavaFX scene minWidth and minHeight not working
I tried the 2 following ways to set minHeight and minWidth for an AnchorPane in JavaFX (such that it is not resizable under 1280x720):
From the controller class (which is called from a Button in a ...
1
vote
1
answer
82
views
set perspective camera as subscene camera in fxml file
In this code I have a Subscene with 3d features enabled. I add camera and meshviews at runtime, but I want to put the camera in FXML because I don´t need to change it at runtime. How can I do that
?
&...
0
votes
0
answers
41
views
TextArea FXML border radius
I'm rounding the borders of my TextArea, but there's a white background behind it, even though it shouldn't be there. How can I remove it?
<AnchorPane style="-fx-background-color: yellow;"...
0
votes
3
answers
195
views
Why does Apache NetBeans Null Pointer Exception give me an error in my Java FXML project?
When I create a new java FXML project in netbeans, a simple code is normally generated, which executes without errors but in my case this is not the case, as soon as I create the project and try to ...
0
votes
1
answer
94
views
How to properly inherit an FXML annotated attribute for having it available in a subclass?
Problem
I'm trying to implement the transmission of messages over a Controller Area Network, where the messages are built from user's inputs through a GUI created with JavaFX.
I have a MainController ...
0
votes
0
answers
31
views
FXMl File is always null in Intellij [duplicate]
My file location is 100% correct, I checked it like a thousand times. Look at my folders and see the path. But somehow the path is always not found. I once tried to print it with the SOUT, it says ...
0
votes
1
answer
291
views
How to grow layouts in Javafx vertically as the height of screen increases?
As evident from the current layout, a considerable gap emerges, progressively expanding with the growth in frame height. My objective is to ensure that both the "Stock Arrival" and "...
0
votes
1
answer
125
views
How can I update a text value of Label in non-controller class of Javafx?
another class is the controller, in a non-controller class of javafx, I can get the Label, but can't update the text value, and there is no any error... any one have the experience, pls help
trying to ...
1
vote
1
answer
87
views
How do I handle multiple button in javafx
I have multiple button on an fxml file. By click on any buttons the fxml form that define in onAction will show.
The quesion is:
Am I should load all the forms with for example foreach and when the ...