Skip to main content
View by: Most Recent | Topic | Community | Webloggers   
Monthly Archives:    

Blogs by topic Programming and user malenkov

• Accessibility • Ajax • Blogging • Business • Community 
• Databases • Deployment • Distributed • Eclipse • Education 
• EJB • Extreme Programming • Games • GlassFish • Grid 
• GUI • IDE • Instant Messaging • J2EE • J2ME 
• J2SE • Jakarta • JavaFX • JavaOne • Jini 
• JSP • JSR • JXTA • LDAP • Linux 
• Mobility • NetBeans • Open Source • OpenSolaris • OSGi 
• P2P • Patterns • Performance • Porting • Programming 
• Research • RMI • RSS Feeds • Search • Security 
• Servlets • Struts • Swing • Testing • Tools 
• Virtual Machine • Web Applications • Web Design • Web Development Tools • Web Services and XML 


Programming

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. javafx({ name: "Reversy",...
on Aug 13, 2010
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. javafx({ name: "Attentiveness", width: 300, height: 300, archive: "https://malenkov.dev.java.net/20100716/Attentiveness.jar" });The test data are stored in the PersistentProperties class that combines the Storage and the Properties...
on Jul 16, 2010
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. javafx({ name: "ResponseTime", width: 320, height: 200, archive: "https://malenkov.dev.java.net/...
on Jul 9, 2010
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? javafx({ name: "Dodecahedron", width: 400, height: 400, archive: "https://malenkov.dev.java.net/20091027/Dodecahedron.jar" });There is...
on Oct 27, 2009
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. For a start, consider the Digit class, an internal auxiliary class. It is used to scroll one number position. Observe how many images do we use for this class. In order...
on Oct 7, 2009
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. javafx({ name: "Main", width: 350, height: 125, archive: "https://malenkov.dev.java.net/20090804/ScoreCounter.jar" });The value variable of the Score class starts a timeline on replace that smoothly changes the old value to a...
on Aug 4, 2009
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. Here they are in the order as they appeared: · Drawing Application · Flying Letters · Magnetic Balls · Weather Widget · Firework (We Salute You) · Analog Clock · First Layout Sample...
on Jun 18, 2009
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 far the JavaFX programming language does not support hash tables to store data of any type, but you can always use the Properties class for this purpose. For a start, let's create methods to put...
on Jun 5, 2009
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 following set of the controls is included in the current API:TextBox: A control which displays and accepts input of text....
on Jun 2, 2009
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...
on Apr 6, 2009
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 <a href="http://java.sun.com/javase/6/docs/api/java/io/File.html">File</a> class contains the delete method. How would you delete a file from JavaFX? The issue here is that the...
on Mar 31, 2009
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. Let's create a fullscreen window first. In the current...
on Mar 18, 2009
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. I'm a little bit lazy today. Therefore, I borrowed the implementation of...
on Mar 3, 2009
(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. javafx({ code: "Firework", name: "Firework", width: 500, height: 300, archive: "https://malenkov.dev.java.net/20090227/Firework.jar" });The Flash class extends the CustomNode class and implements the create method. This method...
on Feb 27, 2009
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. JavaFX Script enables developers to embed expressions into the string using the curly braces. It is very useful...
on Jan 26, 2009
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 lesson about Sequences in Learning the JavaFX Script Programming Language. If a variable is already declared as a sequence variable, square brackets...
on Jan 13, 2009
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. 1. Steal a car. To start we need a car. It is not a problem with the car image available on web or located in the application. Image functionality is described in detail in the Image class overview. But what should we do, if the image is contained in another...
on Dec 29, 2008
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 very easy to create an application that could be dragged when you click on its contents. This feature is important for transparent windows and widgets which have no control elements provided by the...
on Dec 24, 2008
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? The JavaFX 1.0 API provides two simple subclasses of...
on Dec 19, 2008
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. First, draw a second hand. Pay attention to the position of the hand relative to the origin of coordinates, which will be used as a center of rotation. For example, rotate the hand by 60° (10 seconds).      ...
on Dec 18, 2008