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

Blogs by topic: Programming

• 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

In my previous post, I covered Apache Velocity, Eclipse JET/JET2. I got a suggestion to look the framework FreeMarker. FreeMarker look like Velocity. You can even find converters : Velocity -> FreeMarker. I'll describe in this part how to create the same output but using FreeMarker. Take a look at the generate method. SampleFreeMarker.java [prettify]
  public void generate...
on Jan 11, 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
As a follow-up from the previous article on the Interaction-Flow-Service-Model Architectural Pattern (IFSM), let's talk about suggestions for developing a more modular flow layer. All non-flow-related logic should be pushed to service layer (or an additional service-logic layer). Aim for simplicity in controllers and related contextual VOs. Unless something else is needed, lean towards using...
on Dec 19, 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
Kudos to all the Sun hackers involved in this project. You overcame a large amount of negative expectations, perhaps because Sun announced FX too early or because Java SE was in discredit as a RIA platform (6u10 was already a major step to fix that). But I was pleasantly impressed with the FCS. Java FX has great potential, and it could make a really big difference in both the desktop "RIA...
on Dec 11, 2008
I wanted to add Cobertura to Grizzly project within the pom file for Maven, but I got errors at first. I follow the procedure describe on Cobertura website, but it was lacking of a complete example. Cobertura will instrument your classes and you need to run tests to get a test coverage. You need to pass the path of these instrumented classes to the plugin that will run the tests(in the same...
on Nov 11, 2008
There are so many browsers and version of theses browsers that I became harder to create HTML that will run on all the possibles combinations. You need the appropriate tools to help you to debug. There are few application and plugins you need to try : - Firebug for Firefox (https://addons.mozilla.org/fr/firefox/addon/1843) : to debug everything : html, css, javascript, ajax ... - Markup...
on Nov 10, 2008
If you're following my recent adventures (do you have nothing better to do?) you'll know I've been spending a lot of time with JavaFX Script recently. It's a language which targets a wider audience than its bigger cousin — more Javascript than Java. Thanks to The Java Posse I was recently alerted to Fabrizio Giudici's blog asking which scripting languages should be supported in his...
on Oct 30, 2008
There's no shortcut to experience. Writing good object oriented code takes experience, but here are three practices to help you get off on the right foot day one with even the grumpiest of gray beards: Write all your code using Test Driven Development(TDD) Follow the Rules of Simplicity Tell Don't Ask Write All Your Code Using TDD Code written test first and code written test last is very very...
on Oct 3, 2008
Recently Alex Buckley blogged about a possible language change to allow Named Parameters in method calls. Today I had need for such a feature. I was calling this method public void startOperatorSimulation(int pos, int stepDelay, int opNumber) { ... } multiple times, which matches Alex's first use case for named parameters 'When a method has adjacent parameters with the same type but different...
on Sep 30, 2008
Sun Studio 12 delivers a comprehensive tool set for developers—C, C++, and FORTRAN compilers, Sun Performance Library, dbx Debugger, the NetBeans IDE, Thread Analyzer, Performance Analyzer—along with superior performance. A new article on SDN, Why Use Sun Studio 12 Compilers and Tools?, summarizes the features and points you to the free download. Have a look.
on Sep 18, 2008
I just read Rex Young's very interesting blog Turn a HTTP connection into a full-duplex communication Basically he uses HTTP Chunked Transfer Coding to create a full-duplex communication between client and server. Well I recently joined the Grizzly Project as a committer. One of the first things I did is write a Tutorial on How-to write a custom protocol with the help of Grizzly. In a way this...
on Sep 17, 2008
Chris Adamson recently blogged, "what are the advantages of distributed SCM, beyond the globe-spanning mega-projects?" I've been hearing that question for a long time; it started whenever a new engineer joined a Sun project and had trouble getting their head around TeamWare. But it's hard to answer that question except with, "try it for a while and you'll see." The reason...
on Sep 12, 2008
My primary interest is really internationalization, so my blogs sometimes veer into that realm regardless of language or platform. I'm keeping a more i18n focused blog on my own site: joconner.com. My most recent blog is about JavaScript file encodings. If that sort of thing interests you, take a look.
on Sep 8, 2008
You've used in-memory databases, such as HSQLDB (formerly called Hypersonic) or it's newer, faster cousin H2, but fewer have heard about the in-memory mail server, GreenMail by IceGreen. According to their site, "GreenMail is an open source, intuitive and easy-to-use test suite of email servers for testing purposes. Supports SMTP, POP3, IMAP with SSL socket support. GreenMail also provides a...
on Aug 7, 2008
If you're a Java developer and you've been around for any length of time, you've likely run into the issue of wanting to write something that can deal with different versions of the same Java API that may be incompatible. What got me thinking about this, is that I recently saw a forum post in the Atlassian Confluence Developer forum where someone was asking about how to get the version number of...
on Jul 31, 2008
Usually if you are working in a "big" project and doing a code review; if you have a vendor who develop some application for your company; if you have a fresh graduate developer ... you will find a lot of bad-practices in the code being written! I don't like to see System.out.println() in the code .. because simply, it doesn't appears in the log files!!! As a solution, you can use Aspects to...
on Jul 24, 2008
JSR #277: Stanley Ho explains versioning... Sounds like a bad idea to me... I have commented his post. Anyway, I think the idea deserves its own blog post: I hope to see some discussion about it. And I really wonder what your opinions are. Here it is: Major? Minor? Micro? Update? 3 or 4 numbers? IMHO, doesn't matter at all... Stanley, what happened to or what is wrong with my proposal of...
on May 30, 2008