How to create skins(fxml) for buttons and other elements in JavaFX 2.0? [closed]

梦想与她 提交于 2019-12-04 14:51:31

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!