You can view the SimpleSwingBrowser.java file or download the SimpleSwingBrowser.zip file with a NetBeans project. Extract files from the zip file to a directory on your local file system and run the project in your Netbeans IDE.
As of version 7.2, the NetBeans IDE provides support for Swing applications with the embedded JavaFX content. When creating a new project, in the JavaFX category choose JavaFX in Swing Application.