Skip to main content

All Questions

Filter by
Sorted by
Tagged with
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 ...
PalBeron's user avatar
1 vote
1 answer
583 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
1 vote
1 answer
45 views

Can't change bound label property in MVC structured JavaFX application

I'm developing a desktop login GUI currently, and I trying to change a label's visibility while a boolean value isLoggedIn is changed. I simply reproduce my problem with intelliJ's javaFX sample ...
Meteoroid_Kun's user avatar
0 votes
0 answers
20 views

How to integrate the model part of a program with FXML-Controller? [duplicate]

Can someone explain me how to integrate the model part of a program with a FXML-Controller? I'm new to FXML. So far, I tried to create a constructor for the controller and pass the relevant ...
Ernest P W's user avatar
0 votes
0 answers
115 views

Using extended custom class from FXML with custom ControllerFactory

I want to embed my own custom controls that extend from other controls. I want to extend them within Java via extends, not from FXML via fx:root type="..."! As I want to use MVC pattern I ...
NeilArmstrong9000's user avatar
0 votes
0 answers
169 views

I am stuck with MVC pattern

Recently, I am working on a java application based on MVC pattern. There is a table that I am going to insert some elements into it. And When I use the setItems() function to link the table to the ...
Edmond Dantes's user avatar
1 vote
1 answer
347 views

JavaFX NullpointerException with FXML in own dialogbox when trying to close window

I am new to JavaFX. I programmed a tableview with a list of persons with their address. Everything worked fine. Then I wanted to write it in the MVC or even better the MVP Design pattern. I am working ...
yoggozuna's user avatar
2 votes
1 answer
462 views

Javafx/FXML: conflict between initialize() method and FXML Loader:Initialize: NullPointerException, FXML.LoadException

as the Title states, there is a certain conflict between initialize method which builds the Table and adds all content to the Table and the FXMLLoader, which is supposed to load an FXML for a Pop-Up ...
user avatar
0 votes
1 answer
998 views

FXML: positioning multiple elements within an horizontal Box(HBox)

Within an Hbox, i do want to have a text as a title, as well as an search bar with a submit button. The title should be positioned on the left but the search bar with the submit button on the right. ...
user avatar
0 votes
1 answer
402 views

Stuck on a javafx program that won't load the injectable fields into FXML document

The only issue I'm having with this is the getAll() method, it seems that it runs immediately where I have it in the PersonnelController class. I've tried it in many other spots as well though, to no ...
duckyPluck's user avatar
0 votes
2 answers
2k views

JavaFX - Main controller calls sub controller's function which causes Null Pointer Exception

I'm relatively new to JavaFX but I try to be clear. The issue: When my main controller calls my sub controller's function, it runs completely fine as long as it do not need to manipulate the fxml ...
Ricky's user avatar
  • 623
1 vote
1 answer
194 views

MVVM in Java without changing the model (with its business logic)

In my business logic model, I use a class with an ArrayList to store Objects of type Content. Everything works perfecty. However, I have no idea how to bind that model to the ModelView, without ...
Chris F's user avatar
  • 85
0 votes
1 answer
1k views

How to connect multiple controllers to one model? Simple window application in JavaFX

I've seen bunch of posts connected with my problem but it seems like nothing works for me. I'm writing simple window app in Java FX and FXML. I have a Main class which has field with days names. I've ...
user avatar
0 votes
1 answer
71 views

Why does my view no longer communicate with its controller since the controller was set manually?

Ever since I manually set my Controllers the corresponding views don't seem to recognise my controllers. None of the view elements are recognised by my controllers and none of my Controller methods ...
George Baker's user avatar
1 vote
1 answer
126 views

MVC separation in Java and JavaFX (fxml) [closed]

I am willing to use JavaFX on a large size (non web) program that I'm in charge for both GUI and back end. I am new in UI, so for separating back end from UI I am willing to use MVC programming method ...
sam's user avatar
  • 54
0 votes
1 answer
189 views

JavaFX application won't launch at my friend's pc

I was working with my friend on a javaFX application with FXML, everything was okay till we tried to execute our work, we got that strange exception that never happened to me as far as i remember, the ...
BHA Bilel's user avatar
  • 371
0 votes
0 answers
562 views

initialize a TextField from a variable in a controller and using Fxml

I use Javfx and Fxml file to do an application. I would like initialize Textfield with variable data in controller but i have an error : Exception in Application start method java.lang.reflect....
Owczarek Romain's user avatar
0 votes
1 answer
85 views

JavaFx .Fxml and its controller class

How can the relationship between a .fxml file and its corresponding Controller Class be explained
james hardINT's user avatar
1 vote
0 answers
18 views

How to support Drop-in directoris for JavaFx FXML and Controllers?

I'm currently working on a menuing system for which loads its menu options from FXML files, where each FXML files references its own controller. These menu options are not particularly complex, but I ...
Caleb Hulbert's user avatar
0 votes
0 answers
1k views

Java FXML: Putting a string variable into a TextArea

I'm writing an FXML application using JavaFX SceneBuilder 2.0. I have a Text Area containing a couple paragraphs of text. I want to take a variable that the user inputs (in this case, a name), and put ...
Danny the Hopeless's user avatar
0 votes
1 answer
594 views

Close tab in another Controller - JavaFX

I'm designing a simple email client in Java. I'm using two FXML file as the view, and of course, 2 Java controller, each one for the right view. My goal is to close the WriteView tab clicking on the ...
Lorenzo's user avatar
  • 95
1 vote
2 answers
1k views

Where to store model objects in MVC design?

I am using an MVC architecture. The SignupController creates a User object from the SignupView. Where should this User be stored? I have tried storing it into the MainController, but when I need ...
CodingHedgehog's user avatar
4 votes
1 answer
9k views

JavaFX - MVC Application best practices with database

I'm new to JavaFX and I was wondering what are the best practices in this language to develop a MVC database application, I think my question will be pretty simple if you are an senior developer. Let ...
Paul Thirozier's user avatar
0 votes
1 answer
6k views

How to bind checkbox to variable in JavaFX?

I have controller class like this public class Controller{ private final Model model; @FXML private CheckBox chbx1; @FXML private CheckBox chbx2; @FXML private CheckBox chbx3; ...
M. Barabas's user avatar
3 votes
1 answer
6k views

How to update view via model in JavaFX MVC?

I have FXML application with model, view and controller. My view is in .fxml file and I have Text there like this <Text fx:id="position" text="None" GridPane.columnIndex="1" GridPane.rowIndex="3"&...
M. Barabas's user avatar
0 votes
1 answer
883 views

JavaFX - MVPC Pattern - separate FXML objects and event handler methods

I would like to create an application in JavaFX which imlements an MVPC pattern. My idea is the following: VIEW: simple FXML file CONTROLLER: contains the event handler functions defined in VIEW, ...
Levente's user avatar
  • 161
0 votes
1 answer
740 views

How many views/controllers (JavaFX MVC pattern)

I'm new at MVC pattern in JavaFX applications. I'm studying and trying to apply this pattern to my JavaFX app. But on all my searches, I couldn't found an answer on what follows. In my app, I have a ...
Kenna's user avatar
  • 302
-1 votes
2 answers
2k views

JavaFX - include fxml with an event in it

I'm currently trying to implements a very basic application with JavaFX just to do some tests. The final goal here is to implement an interface separated in severals parts, and each part will have its ...
Paul Thirozier's user avatar
0 votes
1 answer
171 views

Passing information between two stages with ScalaFX fails due to not setting the field in controller

I am trying to understand the message passing possibilities of ScalaFX in combination with ScalaFXML. I created a small example, which has two views with controllers defined in the FXML. The first (or ...
Tobs.Core's user avatar
  • 713
0 votes
0 answers
2k views

JavaFx: Can not set javafx.scene.control.TableColumn field address.view.PersonOverviewController.firstNameColumn to javafx.scene.control.Label

Please help me to fix the below JavaFx exception. I got the below exception while i am working on JavaFx Tutorial from code.makery.ch - JavaFX Tutorial. I have attached PersonOverviewController.java ...
Ravin's user avatar
  • 21
2 votes
1 answer
5k views

Using initialize method in a controller in FXML?

I have a Java application with a view written in FXML. I am wanting to select a default tab, so when the program launches the first tab is shown as selected. I have seen the best way to do this is ...
Josh's user avatar
  • 768
2 votes
0 answers
2k views

JavaFX application with multiple fxml files

I have been through java docs, java online courses/presentations on youtube and threads on stackoverflow, but never found an easy and great method to interact between different views on javafx ...
samsebamse's user avatar
0 votes
1 answer
551 views

Reusable controllers in FXML. One controller (slightly changed) for multiple fxml files

I would like to know whether it is possible to "reuse" the controller for another fxml after creating it. In other words, can I create a controller for fxml, modify it a bit, and then use (another ...
TheNephalem's user avatar
3 votes
2 answers
10k views

MVC with JavaFX and FXML

If I have a JavaFX project that uses FXML, how would I structure it to adhere to the Model-View-Controller pattern? This is what I would assume the general structure to be like: Model - Underlying ...
null's user avatar
  • 2,140
0 votes
0 answers
106 views

Accessing FXML Controller Class from predefined Controller class

I implemented a simple application with the MVC-Pattern and used a console for the output. Now I tried to replace the console with a simple JavaFX-Approach to test the independence of my design. The ...
kaikun's user avatar
  • 108
20 votes
2 answers
22k views

JavaFX 8 - Tabpanes and tabs with separate FXML and controllers for each tab

I hope to get some answers regarding having fx:include statements for each tab in a tabpane. I have managed with ease to get content to show up BUT referencing methods of the associated controller ...
Måns Thörnvik's user avatar
0 votes
0 answers
455 views

NullPointerException when calling setText on a label object while initializing controller

So i started creating my first JavaFX application. What it currently does is display dummy data with a TreeView on the left. I want it to show the name and the creation date of the selected item on ...
praktikantas's user avatar
0 votes
1 answer
627 views

Unable to connect Javafx controller event with FXML shape. (Java)

I'm having trouble understanding why this super, super simple method isn't working. Basically what I've got is the standard MVC setup - so I have a controller that controls my layout (the FXML file). ...
Mazzone's user avatar
  • 308
1 vote
1 answer
2k views

JavaFX Sync Duplicate Views to the Same Controller (FXML & MVC)

Below is a small Application that illustrates the problem: ButtonPanel.fxml <ScrollPane fx:controller="ButtonPanelController"> <VBox> <Button fx:id="myButton" text="Click ...
Steve's user avatar
  • 1,041
1 vote
1 answer
2k views

Is there a way to insert children at specific position?

thats a part of my fxml: <VBox> <children> <Button/> <Button/> </children> </VBox> I want to add a new child to vBox. But i want to add it at a ...
Siro Duschletta's user avatar
1 vote
1 answer
3k views

JavaFX+MVC. How to hide/show multiple windows?

How to make that when i click on "Open second window" the main window be hide. And when i close second window, the main window be showed? I read this post, but i don't know how to implement it for my ...
Tomas's user avatar
  • 1,667
0 votes
1 answer
460 views

Error in JavaFX FXML tutorial

I have followed every step in this (https://blogs.oracle.com/jmxetc/entry/connecting_scenebuilder_edited_fxml_to) tutorial, and yet keep getting an error about this section in the controller class: ...
a-joyce's user avatar
  • 187
0 votes
1 answer
540 views

Populating ComboBox with JAVA FX MVC

I need to populate JAVAFX ComboBox with value using an MVC but somehow i cant get the combobox to work. Please help me,, LoginController.java package weltes.finance.controller; import javafx.fxml....
Konz Mama's user avatar
  • 975
0 votes
0 answers
59 views

JavaFX - MVC app doesn't work when all classes are seperated (in other packages)

my app works only when all classes are in application package, when I want to seperate them for particular packages (model, controller, view) it doesn't work, when I change path in Main class to "/src/...
dante's user avatar
  • 403
16 votes
2 answers
65k views

How to connect FX controller with main app

I have a main app class and a fxmlController class but I am entangled in connecting/organizing(confused how these are called and how I should organize them to make the GUI connected business logic) ...
khan's user avatar
  • 185
0 votes
0 answers
546 views

JavaFX: How do I convert this custom Pane class (ImageViewPane.java) into an FXML to import into SceneBuilder?

I'm new to JavaFX, so please forgive the noobishness. So I'm making a Picture Viewer. This is my first time designing a GUI with the MVC paradigm, so I'm not very sure what I'm doing. What I'm Trying ...
Pt. Terk's user avatar
  • 462
2 votes
1 answer
8k views

Adding mouse click action events to labels in JavaFX with FXML

I making a version of Risk in JavaFX. Right now to display the game data I'm using a Grid of Labels that display the information about each territory. I would like to, for now, have mouse click ...
Brent's user avatar
  • 23
9 votes
1 answer
28k views

JavaFX include fxml in fxml without controller

I'm programming an application with javafx. It's a "multiscreen" application with a mainmenu from where I can switch my scene. My scenes are defined in different fxml files. Because I try to use the ...
Garog's user avatar
  • 315
5 votes
1 answer
6k views

SceneBuilder 2: Do controller classes need to necessarily be in the same folder as the view FXML files?

I'm loving JavaFX and SceneBuilder, but I just can't figure out how to make SceneBuilder link my FXML views with their Java controllers when they are not in the same folder. I'd just like to have this ...
zapatilla's user avatar
  • 1,833
0 votes
0 answers
521 views

FXMLLoader explained

I am using javafx combined with FXML. I want to apply the MVC pattern. For that I want my Model.java class to be the model, which launches the View.fxml and the controller of that view would be ...
kaligne's user avatar
  • 3,278