Saturday, October 9, 2010

Swiz Framework

I like the way how Christophe Coenraets describes the Swiz Framework below:
At his core, Swiz is a simple inversion of control framework (IoC). Using an IoC framework, the components of your application (for example, Views) don't instantiate or even look up their dependencies (the objects they work with). The framework injects those dependencies when the components are created (hence the term "Dependency Injection" also used to describe this approach). The result is looser coupling and more reusable components. The components managed by the Swiz IoC framework are called beans.
Swiz uses the [Autowire] custom metadata to inject beans into other beans and views.

Disabled JSplitPane causes the resize cursor not working in JTable

I just found that whenever I disable a JSplitPane with setEnabled(false) then all the JTable in the pane will stop showing the resize cursor on the table header even though they are still resizable. So if you have to disable JSplitPane (make it not resizable) but still want the JTable in it be resizable then you need to provide your own resizer as below and apply it to your JTable this way new TableHeaderCursorResizer(jTable);