Alright, here is the blog for the beginner of JavaFX. We generally say it “getting started”
So, right now I suggest you to work with Netbeans 6.1. There is a good amount of code change going to happen soon in JavaFX but never mind. Here we go:
- 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).
- After installation, go into File -> New Project Section. You can see JavaFX now in project section:
- 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:
- But the most important thing is what you get on right most side with a caption “Palette” (FX Builder). Here how it looks:
- 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.
- Before running the code, you can see the preview of output, by clicking on the preview button.
- This is how the preview will come:
- After you convince with the output, go into the Run Section. Run the application or press F6.
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.If you are not a netbeans user, the you have two option :
- Wise one, download netbeans and start working :).
- Unwise one, we can also work only with javafx preview developer by putting the code in bin folder compiling with javafxc and running with javafx. But then you will not be able to use lot of netbeans features.
2 comments:
hey check out my blog:
http://www.youknowster.com/jokes/view/347-you-know-youre-a-java-weenie-when
Finally, added your blog to NetBeans Community Docs;
http://wiki.netbeans.org/GettingStartedWithJavaFX
Sorry for the delay and thanks :)
Post a Comment