I developed my first implementation of the Reversi game on BASIC 20 years ago. Since then, I ported it on each programming language I studied: Turbo Pascal with graphics library and Turbo Vision, C with the Windows API, C++ with the ClanLib, Java AWT applet, and Swing application with Java2D. Now I am ready to publish yet another implementation, on JavaFX Script.
The attentiveness evaluation test in my driving school was easier than one I developed by using JavaFX. I made it harder by adding the next value randomly.
Last half a year I was quite busy. My personal priority was to get a driving license. Among many exercises in my car driving school there was a psychological test consisting of different tasks to check your reaction. I developed one of them by using JavaFX. It examines how fast you can click.
I've made the decision to participate in the JFXstudio Challenge competition. The subject of the competition is Five. Therefore, I decided to replace the squares with the pentagons in one of my applications. Do you remeber the sample that rotates the cube?
Can you live without computer of Internet for two weeks? I definitely got crazy and forgot everything I knew about JavaFX. Nevertheless, in this blog I'll try to explain how the Score class introduced in my previous post works.
In a game the score refers to the amount of points gained by a player or a team. Consider a JavaFX component that shows the score and enables its smooth changing.
My colleague has just returned from JavaOne and brought an HTC Diamond cell phone that supports JavaFX. Of course I couldn't stop but running my demos on it.
The JavaFX 1.2 SDK provides many useful utility classes such as the Properties class used to access and store name/value pairs or the Storage class used to store the data locally on the client system.
So the next version of JavaFX has been released. I developed an example that shows all the node-based UI controls that had been added to the API to replace the controls based on the Swing library. Note, that new UI controls are available on all platforms including mobile.
The SunTechDays conference will take place in Saint-Petersburg this week. I'm going to participate in it and hold the "Developing Innovative Multimedia JavaFX Applications" seminar together with my colleague. I'll be talking about accessing the web services and deploying applications. My presentation will be based on the WeatherWidget sample that was slightly refactored. So, what kind of weather to expect on the conference?
The most powerful advantage of JavaFX is an easy use of Java classes. However, you can encounter an issue when calling some methods, for example, those that have the insert and delete names. The File class contains the delete method. How would you delete a file from JavaFX?
Fullscreen mode and transparent windows are supported in JavaSE 6 since update 10. I have developed the SideBar example for the JavaOne 2008 by using proprietary Java API to create translucent window that slides out of the right side of the screen. Now I am ready to show the SideBar example created by using the JavaFX API only.
This application creates a digital clock, and is based on the analog clock implementation taken from another example. String formatting is applied to display the current time. Unfortunately, the application can not be run on the mobile emulator, because the mobile profile of JavaFX API does not support graphical effects yet.
(We Salute You): This simple example produces the firework effect using JavaFX Script. The active use of random numbers brings variety to each firework volley.
Sometimes users need to prepare their data for output. Java provides support for layout justification and alignment, common formats for numeric, string, and date/time data, and locale-specific output. However, the JavaFX language reference just briefly mentions this functionality.
If you come across square brackets in JavaFX script, do not think that JavaFX supports arrays. These are sequences. Sequences are not arrays although they are similar. Before reading this blog post I recommend that you familiarize yourself with the tutorial.
Let's steal a car, repaint it, and do this quickly. What is more, do this in JavaFX and consider several programming hints by the way.
Every JavaFX node is able to process mouse movement events. Thanks to this ability the user can easily drag nodes on the scene or move windows. However, there are some nuances worth mentioning...
It is typical to use absolute coordinates to position nodes in a simple JavaFX application. But what if your application becomes more complex? It is quite annoying to change the coordinates of several nodes if one of them changes its size. From Swing and AWT you can recall the mechanism of Layout Managers. Does JavaFX suggest anything similar?
JavaFX has been released recently and now many beginners google on how to start programming. Let us consider a very simple example of drawing a clock face in JavaFX.