A community user in the Oracle forum posted this short snippet in hiding a TableView column header regardless if your table still does not have any data.

The listener will handle the hiding of the header column once it gets triggered.

Sad to say, there is no such control in Java FX 2. However, Java FX 8 has one. Then again, if you want to maintain your rule that you must never force the user to update to the latest version just to be able to see a date picker, the only option is to make one.

Luckily, somebody else did the dirty work for us. Marko Jacob extended a more flexible version from Christian Schudt and it works flawlessly. Plus, using it is fairly easy too.

The downside to this is that you cannot import this control in the Java FX Scene Builder. You will have to add the DatePicker control programmatically.


Download his JavaFX Date Picker Release on GitHub.

I wish Oracle simply included this feature so developers would not have to code it from scratch. However, I came across a custom made class called ScrollFreeTextArea from the javafx-demos website.

This class simply did the trick for me. So whenever you type a long text and it wraps itself or press the ENTER key for a new line, the height of the TextArea increases without displaying the scrollbar.

Here is the complete source code.

Related Posts Plugin for WordPress, Blogger...