1:q: In Hbox, how to make a part of a control to the left, part of the control to the right, and regardless of how the window size remains relative to the same position, the layout is as follows:
[Left Control] [Controls that are automatically scaled in the middle] [Right Control]
A: The middle will be scalable control using region, and set its hgrow for always, reference Fxml source code is as follows:
<region prefheight= "34.0" prefwidth= "102.0" hbox.hgrow= "ALWAYS"/>
The data in the 2:q:tableview cannot be displayed, and the system does not prompt for error messages.
A: There is a possibility that the corresponding data model class has no Get/set method. Note, however, that there may be other possibilities, such as a corresponding property name error.
3: How to perform the code operation interface after initializing the interface. Method 1: Make the controller implements initializable interface, processing in the Initialize Method 2: After you show the interface in Applicaiton, call the method in controller:
Fxmlloader Fxmlloader = new Fxmlloader (GetClass (). GetResource ("Manager.fxml"));
Parent root = (parent) fxmlloader.load ();
Managercontroller controller = (Managercontroller) fxmlloader.getcontroller (); Parent root = Fxmlloader.load (GetClass (). GetResource ("Manager.fxml"));
Scene Scene = new Scene (root);
Primarystage.setscene (scene);
Primarystage.setmaximized (true);
Primarystage.show ();
Controller.showinfo ("Interface Initialization complete");