Reputation: 4010
I have seen several custom JavaFX control tutorials around, but no tutorials on how to create a custom pane layout. I ask because I am trying to create a flowing two-sided (think form-like (name,value) pairs) layout pane with titles. I have previously done the control in WPF, and am "migrating" it to JavaFX. Are there any places I could look for learning how to make a custom layout pane aside from the OpenJDK sources?
To clarify: I an looking for how to create a custom pane layout manager and not custom controls
Upvotes: 8
Views: 5296
Reputation: 674
I hope the TableView in JavaFX will serve your requirement of creating a form like structure. Ideally you should go for custom layouts only when no existing layouts serve your purpose. Here is the link to learn more about creating custom layouts: https://docs.oracle.com/javase/tutorial/uiswing/layout/custom.html
Upvotes: 0
Reputation: 5977
I'm not sure myself, but I think you should override layoutChildren
method from the Parent
class. This method is called each time the JavaFX performs layout pass.
You may use controlsfx project code as sample. Just clone it and search for layoutChildren
string in the project. impl.org.controlsfx.spreadsheet.GridRowSkin.java looks like a good example.
Upvotes: 3
Reputation: 3126
you can use Scene Builder...this is specially made for make all types of custom controls and designing in javafx.
Upvotes: -2