O'Reilly logo

JavaFX™ Developer’s Guide by Kim Topley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

25. Building Custom Controls

In this chapter, you see how to build new user interface components. In the first part of this chapter, we create a simple component by extending the CustomNode class. The advantage of this approach is that it is easy to create a working component but, on the downside, its visual appearance is more or less fixed—although you can change its colors, fonts, and so on, you can’t radically change the way that it looks. Later in this chapter, you see how to build a more flexible component, at the cost of a little more effort, by subclassing the Control class. Unlike a custom node, a control does not have a fixed visual representation—instead, it has a skin, which can be replaced to give the control a different appearance ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required