问题
I am wondering if anyone has or knows a link from where I can learn or see how to create skins for buttons, radio buttons, scrollbars etc. using fxml files in JavaFX 2.0.
I have this homework for school and I want it built very well, so I try to do everything like a corporative application, with skins for buttons and other elements.
I would really appreciate any help.
[EDIT] Hi everyone, it has been a while, and i know more now about JavaFX and now when i look back, i see how stupid it sounds, please just forgive me for disrespect and for poor detailed question. Anyway stackoverflow made sure i will never ask any question again.
回答1:
You should to prefer search the net first before asking. Here are some results of mine which took a little effort to find out:
- Firstly, intro to Skinning Architecture in JavaFX to understand what is going on.
- Another intro about JavaFX 2.0 Layout: A Class Tour, to understand distinctions between Group, Region and Control. Since Control implements Skinnable, you may want to add this intro to your bachelor work.
- And here first try of JavaFX 2.0 Custom Control.
- Finally, dig the code of open source project JFXtras. You will find there a bunch of custom controls as reference.
来源:https://stackoverflow.com/questions/10465752/how-to-create-skinsfxml-for-buttons-and-other-elements-in-javafx-2-0