Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
0 answers
73 views

How to access an object in a parent class from inside a child class? [duplicate]

I'm trying to follow this answer this answer here in building my first JavaFX app and ran into an problem with passing a reference to the dataModel to the child controller in my MVC. Here's what I ...
ironchefc's user avatar
5 votes
1 answer
56 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 ...
user1438038's user avatar
  • 6,009
5 votes
1 answer
70 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 ...
StealthRT's user avatar
  • 10.4k
2 votes
1 answer
66 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 ...
Carlos's user avatar
  • 21
0 votes
1 answer
44 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 ...
Billie's user avatar
  • 165
0 votes
0 answers
78 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 ...
PalBeron's user avatar
0 votes
0 answers
38 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 ...
Matheus's user avatar
0 votes
0 answers
34 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 ...
Haze's user avatar
  • 11
0 votes
1 answer
339 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 ...
Rusty's user avatar
  • 115
0 votes
1 answer
66 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 ...
killian GRAS's user avatar
1 vote
1 answer
74 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 ...
jc0022's user avatar
  • 90
3 votes
1 answer
52 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 ...
froggy's user avatar
  • 592
2 votes
2 answers
102 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....
Billie's user avatar
  • 165
3 votes
1 answer
49 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); } ...
XiaoJiawei's user avatar
1 vote
1 answer
44 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 ...
Ali Yahya's user avatar
-1 votes
1 answer
40 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) ...
TheMaro's user avatar
0 votes
1 answer
43 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 ...
Zahra 's user avatar
  • 85
0 votes
0 answers
48 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 ...
Enrico Sombini's user avatar
0 votes
0 answers
57 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 ...
BEdits's user avatar
  • 31
0 votes
0 answers
38 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" ...
Arpan's user avatar
  • 35
2 votes
1 answer
75 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....
Johannes Riecken's user avatar
0 votes
1 answer
52 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 ...
onuk98's user avatar
  • 11
4 votes
1 answer
55 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....
Marius's user avatar
  • 43
1 vote
1 answer
86 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 ...
Kameron's user avatar
  • 31
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 ...
Christian Bekheit's user avatar
0 votes
2 answers
86 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
stevegrkek's user avatar
2 votes
0 answers
41 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 > ...
StM's user avatar
  • 38
0 votes
0 answers
57 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 ...
Poor Noob At Code's user avatar
0 votes
0 answers
54 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 ...
Dog's user avatar
  • 1
4 votes
1 answer
77 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 ...
kooliobrb's user avatar
  • 109
1 vote
1 answer
74 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 ? &...
Giovanni Contreras's user avatar
0 votes
0 answers
37 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;"...
Hamvy B's user avatar
0 votes
3 answers
166 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 ...
eduard marinez's user avatar
0 votes
1 answer
86 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 ...
Giuseppe's user avatar
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 ...
najmus sabir's user avatar
0 votes
1 answer
219 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 "...
AdnanArch's user avatar
  • 116
0 votes
1 answer
123 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 ...
Pining Doggie's user avatar
1 vote
1 answer
85 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 ...
F.M's user avatar
  • 511
0 votes
0 answers
37 views

Why does my javaFX field reset in every keyframe?

I'm trying to write a simple snake game using javaFX, and I'm currently working on the movement. I'm using a timeline to make the snake move every keyframe, and then register keyEvents to change ...
kat1234's user avatar
0 votes
0 answers
26 views

File not found issue JAVAFX [duplicate]

I have an issue with getResource() method public void initialize(URL url, ResourceBundle resourceBundle) { recommendations = new ArrayList<>(getRecommendations()); for (int i = 0;...
wail_10's user avatar
  • 51
2 votes
2 answers
115 views

How to save an image snapshot of a Pane as a BMP?

I have successfully managed to plot two graphs (BarChart and LineChart) on the same pane. I am trying to implement a save button, which when clicked, writes the resultant image (with axes) to a bmp ...
MrChickenNuggetBadman's user avatar
1 vote
1 answer
99 views

Javafx open another fxml in another window with button?

Is it possible in javafx to open new stages (windows) from another fxml with a button? Thanks for the answers. Because I got this error : javafx.fxml.LoadException: /C:/Users/Me/Desktop/jj/target/...
Ayoub's user avatar
  • 31
0 votes
1 answer
65 views

In javafx apply css styles to only the top-level menus but not their sub-menus

In a javafx proj with fxml & css files for ui design & styling, naturally there is a MenuBar containing a menu-tree like: Edit | Copy Paste View | ShowGrid Show Zoom | ...
Y.F.'s user avatar
  • 67
1 vote
1 answer
331 views

How to load a FXML file onto another FXML file with different controllers [closed]

I'm currently working on my first FXML project and also trying to implement the MVC format. My project is to build a calculator and my way of proceeding is by having a base fxml file with a menu that ...
CHLaroche's user avatar
0 votes
0 answers
41 views

Problem dynamically filling a VBox with HBoxs in JavaFX [duplicate]

I’m developing an application in JavaFX and I’ve encountered a problem when trying to dynamically fill a VBox with HBoxs. In my FXML file, created with Scene Builder, I have a VBox named “...
Oussama's user avatar
0 votes
1 answer
45 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(...
Karim Ibrahim's user avatar
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 ...
Peihang Lyu's user avatar
0 votes
2 answers
299 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 ...
ProgrammerJibon's user avatar
0 votes
0 answers
65 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, ...
Kameron's user avatar
  • 31
0 votes
1 answer
1k 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 ...
Alejandro Ardila's user avatar

1
2 3 4 5
73