Just a quick post here. Found another example in Popup code that can be cleaned up and wanted to share. Here is the original code:
[jfx]
FX.deferAction(function() { doAutoHide(); });
[/jfx]
This line of code is going to use the FX.deferAction function which takes as a parameter a function with no arguments and no return. (FX.deferAction is essentially like SwingUtilities.invokeLater(Runnable)). However, since the doAutoHide() function already has this method signature, I can avoid creating the anonymous function and instead simply do:
[jfx]
FX.deferAction(doAutoHide);
[/jfx]
Much nicer.
Trackbacks/Pingbacks