Tips & Tricks

­
29 06, 2018

JavaFX Tip 31: Masking / Clipping / Alpha Channel

By |June 29th, 2018|JavaFX, Tips & Tricks|2 Comments

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 [...]

19 06, 2018

JavaFX Tip 30: ScrollPane with DropShadow

By |June 19th, 2018|JavaFX, Tips & Tricks|0 Comments

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 shadow to the top of the scroll pane. This is also something suggested by [...]

18 06, 2018

JavaFX Tip 29: Make Layouts Ignore Invisible Nodes

By |June 18th, 2018|JavaFX, Tips & Tricks|0 Comments

Back in the days when I was still implementing UIs in Swing I used to be a big fan of MigLayout ("one layout manager to rule them all", right Mikael?). One of the features I really liked was the possibility to define different behaviors when a component became invisible. MigLayout allowed me to either preserve [...]

7 09, 2017

JavaFX Tip 28: Pretty List View

By |September 7th, 2017|JavaFX, Tips & Tricks|3 Comments

When I look at the list views on my mobile phone I always notice that they display their scrollbar (normally a vertical one) very differently than JavaFX does. The same is true for applications running on MacOS X. Below you can see a snapshot of Apple's calendar app. You will notice that the scrollbar is [...]

29 08, 2017

JavaFX Tip 27: HiRes / Retina Icons

By |August 29th, 2017|JavaFX, Tips & Tricks|1 Comment

I recently had a lot of icons sent to me by a graphics / UX designer. It was my job to add them to a JavaFX application. Each icon was shipped in three sizes (16x16, 32x32, 64x64). The naming convention for them was like this: icon-name.png icon-name@2x.png icon-name@3x.png At first I thought that this was [...]

3 07, 2017

JavaFX Tip 26: Go Dark – The “Darcula” Theme

By |July 3rd, 2017|JavaFX, Tips & Tricks|0 Comments

I am a big fan of IntelliJ IDEA and use it every day for the various projects I work on. One thing I like a lot is the dark theme called "Darcula". I like it because it looks cool and because of the low contrast it is better for my eyes. When you stare at [...]

2 03, 2017

JavaFX Tip 25: Use FXSampler!

By |March 2nd, 2017|CalendarFX, FlexganttFX, JavaFX, Tips & Tricks|0 Comments

The Problem As a framework developer it is essential to have an easy way to individually test the appearance of and the interaction with each custom control. I really hate it when I first have to open five different screens before I finally get to my new control so that I can test it. Not only [...]

1 02, 2017

JavaFX Tip 24: Custom Layouts for Performance and Flexibility

By |February 1st, 2017|CalendarFX, Java, JavaFX, Tips & Tricks|0 Comments

I just finished a two month sprint on advancing CalendarFX and getting it ready for release 8.4.0. One focus of this sprint was on performance. There are many things that can influence performance but when it comes to JavaFX the number of nodes in your scenegraph and CSS styling are top candidates for optimisation. After reviewing the custom controls [...]

18 07, 2016

Wanted: JavaFX Tips and Tricks

By |July 18th, 2016|JavaFX, Speaking, Tips & Tricks|0 Comments

At this year's JavaOne conference in San Francisco I will be presenting a session called "JavaFX Tips and Tricks". This talk will be based on the posts in my blog. However, I have a feeling that there are many more nice tips and tricks out there that should be mentioned in this presentation. So I am asking [...]

4 04, 2016

Shadow Fields vs. Property Accessor Interface

By |April 4th, 2016|Java, JavaFX, Tips & Tricks|2 Comments

Carl Dea recently followed up on a blog post of mine called Save Memory! Use Shadow Fields for Properties. In his blog he suggested the use of an interface called "Property Accessor" to eliminate the heavy use of boilerplate code that is needed in order to use  shadow fields. Carl also mentioned that he hasn't [...]