JavaFX small Examples.
Tuesday Jul 15, 2008
java2s.com is one of my loving sites, yes because I got all types of code on this site. And the best part it will show you different view of codes like API based, Application based and many more. Don't know how a JFileChooser works!! Just go on the site and check for the smallest code for JFileChooser. It contains code of Java, C++, .Net, JavaScript, HTML, Python... whatever language I heard of:-).
I have not seen any repository regarding JavaFX, probably because of being very new. I proposed the site owner to add JavaFX codes as well. For adding the support of JavaFX, I have started writing small JavaFX code. Small means very small.
Here are some of the codes I have written. Please have a look and feel free to use it.
1. MapNavigation_MouseEvent.fx: It will navigate into the map. I have not yet checked the boundary condition. Simple 14-15 line of code.
2. CarAcrossRoad.fx: Running car across road with easeboth style. This is different from linear motion. This motion smooth the object at the end. Have a look ! Some 10-11 lines of code.
3. PolygonInsideFrame.fx: Shapes are easy to make in JavaFX. I have just made one polygon(Octagone) inside a frame. Actually, I wanted to make the STOP symbol of traffic light.
4. RotatingImage.fx: Rotation of Image or any transformation is very easy in JavaFX. This example depicts a normal image rotation.
5. MoreComponentsInFrame.fx: This example will show how to add components like Button, CheckBox, RadionButton and many more inside Frame of JavaFX.
6. FullScreenExample.fx: How to run a application in full screen. There is a feature of making undecorated value : true which remove the frame border,close button in the application. It can give you a feeling like the start up screen of Netbeans. This example is for full screen but we can manage the frame size anytime. It gives you a nice look for startup. I have used the same in first navigation example.
All these examples are very trivial but I guess can help for someone who is getting started with JavaFX like me.















Hi, I want to resize a loaded picture, but I can't...
transform: [translate (200.0,10.0),rotate(61,100,1...
Hi,Im creating a sidebar to embed the yahoo portal...
yes you can use translateX and translateY and bind...
hi,im done with the image thing..thanks a lot...
you must have written something wrong on mouseMove...
ImageView{
translate...