Tips & Tricks

JavaFX Tip 32: Need Icons? Use Ikonli!

Motivation I have been coding JavaFX applications and libraries since 2013 and one thing they all had in common was that I needed to find good icons / graphics that I could use for them. As a former Swing developer I started by using image files, GIFs or PNGs. Normally I would license a library like the "O-Collection" from IconExperience (www.incors.com). But soon it became apparent to me that using image files is too painful. Just imagine for a moment that you want to support different pseudo states of your nodes (e.g. "hover", "pressed", "focused"). You end up with [...]

By |2021-02-18T13:42:23+01:00March 11th, 2020|JavaFX, Tips & Tricks|0 Comments

JavaFX Tip 31: Masking / Clipping / Alpha Channel

Selection Strip I recently had to implement a custom control that lets the user select a single item out of a list of items. This "SelectionStrip" control had to lay out the items horizontally and in case of too many items allow the user to scroll horizontally left and right. The control was to be used in a space-constrained area, so the buttons for scrolling should only appear when needed. They also should not waste any additional space when showing. So I decided to place them on top of the control on the left and right sides. All of [...]

By |2021-02-18T13:42:24+01:00June 29th, 2018|JavaFX, Tips & Tricks|0 Comments

JavaFX Tip 30: ScrollPane with DropShadow

In one of my projects I recently noticed that it was hard for the user to see whether the content of a ScrollPane instance was currently scrolled or not. One way of making this more clear is to add a drop shado