Oct 31, 2009

What are Oracle’s plans for NetBeans?

Oracle has a strong track record of demonstrating commitment to choice for Java developers. As such, NetBeans is expected to provide an additional open source option and complement to the two free tools Oracle already offers for enterprise Java development: Oracle JDeveloper and Oracle Enterprise Pack for Eclipse. While Oracle JDeveloper remains Oracle’s strategic development tool for the broad portfolio of Oracle Fusion Middleware products and for Oracle’s next generation of enterprise applications, developers will be able to use whichever free tool they are most comfortable with for pure Java and Java EE development: JDeveloper, Enterprise Pack for Eclipse, or NetBeans. Original document link.

SwingX 1.6?

Two days ago the a new TAG was created in the subversion repository of the project. It is SwingX-1-6 with comment: "Release of SwingX 1.6.". There is an forum topic I have found: http://forums.java.net/jive/thread.jspa?threadID=66444&tstart=0
Covered a lot of distance since final SwingX 1.0. The most important was target jdk1.6. This implied to remove 1.5 specifics, hacks and - most prominently - re-doing sorting/filtering core-style. That and lots of internal cleanup resulted in fixing 80+ issues so far. Another about 20 issues are targeted at 1.x, that is the next release, but could easily be moved to the second next. Obviously, those changes will break existing code. And are bound to have added new bugs ;-) But on the whole, I think it's a rather stable state right now and as such a good opportunity for a release. Would call it 1.5 because so much has changed. And would love to push it out of the door as soon as possible, as long as it is half-way stable. Next major changes will be - new/replaced components, like JXTreeTable going JXXTreeTable and JXComboBox which uses a sortable, highlightable JXList - enhanced Nimbus (and general Synth) support Comments highly welcome! Jeanette
Other related links: SwingXChanges

Oct 28, 2009

Apache Velocity is my choice.

If you need to generate some text (HTML, SQL, e.t.c.) you have a significant number of options. Even for java we have a lot of engines and tools. How to choose a right solution? I have performed several tests to make a picture a bit more clear. Tested approaches are enumerated below: Full tests report you could find here. Source code could be found here.

New Substance - old problems!

A new release (5.3) still useless for me. The unresolved issues with SwingX components prevent from using this well looking and features rich LnF in my projects. Some screen-shots are below. I have created a simple application to demonstrate issues with SwibgX (1.0) components under Substance (5.3) LnF. First of all JXErrorPane while resizing run out of screen. It looks really ugly. Secondly JXTable looks absolutely different of JTable. Here is the source code to reproduce the behavior depicted above.
package javatabletest;

import java.awt.GridLayout;
import java.awt.HeadlessException;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.table.DefaultTableModel;
import org.jdesktop.swingx.JXErrorPane;
import org.jdesktop.swingx.JXTable;
import org.jvnet.substance.skin.SubstanceBusinessLookAndFeel;

public class Main {

    static class MyTableModel extends DefaultTableModel {

        public MyTableModel(Object[][] data, Object[] columnNames) {
            super(data, columnNames);

        public Class<?> getColumnClass(int columnIndex) {
            return (columnIndex == 4)?Boolean.class:Object.class;


    static Vector createDataVector(int id, String n, boolean a){
        Vector v = new Vector();
        return v;

    public static void main(String[] args) {

        SwingUtilities.invokeLater(new Runnable() {

            public void run() {
                try {
                    UIManager.setLookAndFeel(new SubstanceBusinessLookAndFeel());
                } catch (UnsupportedLookAndFeelException ex) {
                    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
                JXErrorPane.showDialog(new Exception());

    private static void createUI() throws HeadlessException {
        JFrame frame = new JFrame("Table test");

        String[] columnNames = {"First Name",
                                "Last Name",
                                "# of Years",

        Object[][] data = {
            {"Mary", "Campione",
             "Snowboarding", new Integer(5), new Boolean(false)},
            {"Alison", "Huml",
             "Rowing", new Integer(3), new Boolean(true)},
            {"Kathy", "Walrath",
             "Knitting", new Integer(2), new Boolean(false)},
            {"Sharon", "Zakhour",
             "Speed reading", new Integer(20), new Boolean(true)},
            {"Philip", "Milne",
             "Pool", new Integer(10), new Boolean(false)}

        MyTableModel model = new MyTableModel(data, columnNames);
        JTable table1 = new JTable(model);

        JTable table2 = new JXTable(model);

        JPanel panel = new JPanel(new GridLayout(2, 1));

        JScrollPane pane1 = new JScrollPane(table1);
        JScrollPane pane2 = new JScrollPane(table2);



Oct 19, 2009

Better Swing Application Framework 1.9 Milestone 1

It is a first real release of this project. Changes since bsaf-1.9EA2: 1. SessionStorage class is refactored 2. Custom property support could be plugged in to the session storage 3. Bug fixes 4. Unit tests fixes Download http://kenai.com/projects/bsaf/downloads/directory/Releases/1.9/M1