Closures Are in Again

According to Sun, the controversial language feature, Closures, that was previously removed from the JDK 7 feature list has now been added in again (via).  I’m looking forward to the JSR on this one.  While I can’t see it being more elegant that using Scala, it will definitely make certain algorithms much nicer to implement in Java.

Using the New java.io.Console Class

The 1.6 release of the JDK included a new java.io.Console class, which adds some new features to enhance and simplify command-line applications. Notably, Console includes a method specifically for reading passwords that disables console echo and returns a char array; both important for security. Scenario: Getting Username and PasswordGetting a user’s username and password is probably one of the more common …

Using the New java.io.Console Class Read More »

JTree Drag and Drop Gotcha

Before adding Drag and Drop capabilities to my JTable, I read Java Tip 97 and Java Tip 114 from JavaWorld. They were fairly helpful, but I ended up doing things a little differently. In implementing my Drag and Drop JTree, however, I was plagued by a persistent exception: “InvalidDnDOperationException: Drag and drop in progress.” I debugged my code for hours …

JTree Drag and Drop Gotcha Read More »

Scroll to Top