Java Virtal Machine.net

[ News ] rss

February 01, 2011

Mark Wielaard: New GPG key. Finally created a new GPG key using gnupg. The old one was a DSA/1024 bits one and 8 years old. The new one is a RSA/2048 bits one. I will use the new one in the future to sign any release tarballs I might create. pub 2048R/57816A6A 2011-01-29 Key f...

More »

February 01, 2011

Andrew Hughes: [SECURITY] IcedTea6 1.7.8, 1.8.5, 1.9.5 Released!. We are pleased to announce a new set of security releases, IcedTea6 1.7.8, IcedTea6 1.8.5 and IcedTea6 1.9.5. This update contains the following security updates: The IcedTea project provides a harness to build the source code from OpenJDK6 u...

More »

April/2024
SunMonTueWedThuFriSat
 123456
78910111213
141516171819 20
21222324252627
282930    

[ Archives News
for 'Java Technology' ]

home > news > java technology > wiring javafx objects with spring - tread with caution

Wiring JavaFX objects with Spring - Tread with Caution

I am drawn to JavaFX these days. Not because it is cool (which, it is) or because I want to do whiz bang effects, but just as an explorer to do an unbiased check on whether it can be a tool useful to create regular corporate UIs in any better fashion than regular Swing. (Granted, I squirmed a bit when using it on my first project due to lack of UI components, but JFxtras http://www.jfxtras.org has helped me on that front.) I like Spring framework. Who doesn't? (Well some don't. But anyway, that’s not the point). I wanted to see if I could combine the both to see if it is a match made in heaven. In other words, I attempted to see if I could wire JavaFX components using Spring. After trying a couple of scenarios, I found at least one scenario, where this may not work as expected. Here are the details: I started with bare basics of using JavaFX with Spring first. Look at the code in Listing 1 for wiring a simple JavaFX class using Spring. Listing1      Needless to say that I cannot do constructor injection since there is no concept of constructor in JavaFX. So, my next resort is setter injection. It worked and Listing 2 below shows my JavaFX class. Listing 2 public class SomeJavaFXClass {     public var variable1:String on replace {         println("variable1 repacement called");     }    public-init var variable2:Strin...


Date: June, 12 2010
Url: http://www.java.net/blog/srikanth/archive/2010/06/12/wiring-javafx-objects-spring-tread-caution


Others News

©2002-2019Java-Virtual-Machine.net website maker | best website maker | best web design software | best website builder software | css slider