Scratch Pad Project
Always have a scratch project laying around where you can test new ideas. It should have a "proper" build script, and accessible as a separate project in your IDE.
I find it very helpful to play around with an unfamiliar library.
For example, let's suppose I want to use JavaFX's MenuButton, but I've never used it before.
Open up the scratch project, create a bare-bones window with a single MenuButton in a ToolBar. When you are happy with the results, copy/paste any "good" code into the real project.