GettingStartedWithJavaFX

Getting Started with JavaFX

Contributed By; Vaibhav Choudhary


Reposted from http://java4ever.blogspot.com/2008/10/javafx-getting-started.html


Contents


Brief Overview


Before you plunge into developing with JavaFX, one should know how to configure your system first...However, this tutorial is going to focus on NetBeans 6.1 IDE, if you're willing to contribute a tutorial like this based on latest releases. Let us know... :)

Steps to Reproduce


  • Start Netbeans 6.1.
  • Go into Tools > Plugin section. Go into Available Plugins, search for JavaFX in the search box. You may see more than this, but whatever comes on the name of JavaFX, install all (I already have it in installed section).

Image:1_GettingStartedWithJavaFX.jpg

Create Project

  • After installation, go into File > New Project section. You can see JavaFX now in project section;

Image:2_GettingStartedWithJavaFX.jpg

  • Click on Next, it will ask for Project Name. Enter a project name JavaFXApplication (this is what I have written) and click Finish. You will get something like this;

File:3.png

Using FX Builder

  • But the most important thing is what you get on right most side with a caption Palette (FX Builder). Here, how it looks;

Image:4_GettingStartedWithJavaFX.jpg

  • In place of place your code here, we need to write our code. So, let’s start with Drag and Drop work. First we will make a circle. So, drag a Frame into the code space and then drag a circle in the content section of code.

File:5.png

Preview Output

  • Before running the code, you can see the preview of output, by clicking on the preview button.

Image:6_GettingStartedWithJavaFX.jpg

  • This is how the preview will come;

Image:7_GettingStartedWithJavaFX.jpg

  8. After you convince with the output, go into the Run section. Run the application or press F6. 


Work Ahead


In the next blog, we can discuss on how to use FX builder to make more wise applications like running a ball, making 3D balls, image gallery or something else, depending on the demand :).

Please let me know if there is/are some problem(s) in installation or running the application.

All the Best..

See Also


Visit javafx.com for downloads, demos, FAQs and documentation. Visit wiki.netbeans.org for more NetBeans-related tutorials.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo