3,634 questions
0
votes
1
answer
126
views
How to retain lateral space between Text elements in FXML TextFlow
I want some styled, non editable text in a JavaFX app. I've been using TextFlow objects with Text children and CSS styling, all specified by FXML.
I see my Text elements are pushed together (see image)...
1
vote
1
answer
67
views
Embedding fxml in fxml: Access to the parent controller and switch between fxmls
I have an application, where the ParentView consists of a horizontal SplitPane with two buttons at the left side to choose a ChildView, which is embedded at the right side.
With the two ParentView ...
1
vote
1
answer
58
views
Using external fxml as a library/tag in parent fxml
Using FXML, can I only put a child.fxml into the parent.fxml, and then fill out the values from the parent? For example:
child.fxml:
<HBox xmlns="http://javafx.com/javafx"
xmlns:...
0
votes
0
answers
36
views
Facing issue in moving focus b/w different components in Richtext's CodeArea in javaFx
i am trying to include a suggestion box (similar to VSCode's code completion box) in richtext's codearea. But it faces major issues:
cursor doesn't change when the mouse is inside the suggestion box, ...
2
votes
1
answer
139
views
JavaFX with Ikonli: "Cannot resolve 'fas-home'" when using FontIcon
'm building a JavaFX application using Maven, and I'm trying to use Ikonli with FontAwesome icons. However, I keep getting this runtime error
Caused by: java.lang.UnsupportedOperationException: Cannot ...
0
votes
0
answers
92
views
Button not clickable due to overlap with stackpane
I am trying to create a pane containing a label and having various buttons on its border.
I am new to JavaFx and I do not know if the way I used is the best, however I doubt it since I encounter a ...
0
votes
1
answer
116
views
JavaFX: Unable to load image from FXML - "Invalid resource: /image/eco-house.png" not found on classpath
Project Details:
remarque:
i am not using jar now
Her is The Project Structure:
enter image description here
Image Location:
The image eco-house.png is located in the path src/main/resources/image/...
1
vote
0
answers
34
views
JavaFX left and center aligment [duplicate]
I'm trying to create a UI that has a home button on the top left and a logo image on the top center.
I just can't seem to align these two objects so that they're both in the right position...
Can you ...
-3
votes
1
answer
68
views
JFXToggleNode: changing text font weight [closed]
I have some text On my JFXToggleNode and I want to bold the text when it is selected
What I have try so far
.menuToggle:selected .text {
-fx-font-weight: bold;
}
Actual result: nothing changes.
I ...
2
votes
1
answer
157
views
JavaFX overlaying TextFlow with TextArea
I am trying to create a basic project as I am new to JavaFX. After some digging around, I found out that:
TextArea can provide selectable text, but cannot provide colorable text.
TextFlow can provide ...
0
votes
0
answers
33
views
Random javafx.fxml.LoadException when attempting to load a new Stage JavaFX [duplicate]
This controller class is the controller class of Simulator.fxml
Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: javafx.fxml.LoadException:
/C:/Users/f/...
2
votes
1
answer
78
views
Afterburner.fx - File: *.fxml not found
I am building a simple application with JavaFX + Afterburner.fx.
When running mvn clean javafx:run, I get this error:
File: recipelistpresenter.fxml not found, attempting with camel case
Cannot load ...
4
votes
0
answers
108
views
How to create custom JavaFX components using FXML without triggering "this-escape" warning?
I'm trying to create custom UI components in JavaFX and use them in an FXML file. JavaFX provides the fx:root tag for this purpose, which allows a custom class to be set as the root component.
...
1
vote
0
answers
74
views
The universal selector * overrides more specific selectors in CSS for JavaFX FXML
I'm making a dictionary application with JavaFX and Kotlin.
Here is my code:
<VBox spacing="20" alignment="TOP_CENTER">
<HBox spacing="20" alignment="...
0
votes
1
answer
123
views
JavaFX Scene Builder: Switching forms by using managed="false" and visible="false"
I am trying to find in JavaFX Scene Builder 23.0.1 the property "managed" but cannot find it. Has anybody else an idea? Below is an example code:
Package name: package com.example.demo;
...
0
votes
1
answer
66
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
71
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 ...
2
votes
1
answer
136
views
Resizing ComboBox by scaling screen size [closed]
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
48
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
393
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
83
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
56
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 ...
0
votes
0
answers
91
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
218
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
72
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
31
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
62
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
87
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
109
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
90
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
61
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
96
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 ...
1
vote
1
answer
2k
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
85
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
137
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
65
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
255
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
66
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
113
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
49
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
107
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
56
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
66
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
44
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
159
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
68
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
74
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
157
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
21
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
162
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