Java Reference
In-Depth Information
Figure 13-11. Scala project creation in Eclipse
We name our project Hello ScalaFX and use the default project settings. When asked to switch to the Scala
Perspective, choose Yes and you will be in the proper view for editing Scala code.
In addition to the standard project setup, we also need to add in the ScalaFX and JavaFX libraries to code using
this DSL. ScalaFX can be downloaded from the Google Code web site here at http://code.google.com/p/scalafx/ .
You already have the JavaFX libraries installed as part of the JavaFX runtime and SDK. To install ScalaFX, simply
download the latest distribution as a jar and add it to your project as a dependent library. The easiest way to do this is
as follows.
1.
Copy the ScalaFX.jar file to a lib folder under your project root.
2.
Right-click your project and choose Properties . . . from the context menu.
3.
Navigate to the Java Build Path entry, select the Libraries tab, and click Add Jars.
4.
Select the ScalaFX.jar file you added to your project in Step 1.
 
Search WWH ::




Custom Search