The next entry of the Swing in a better world serial
Swing makes it very easy to control and modify simple components like JLabel or JButton. It gets trickier when you customize a compound component like JTree or JTable. Unlike a simple component, JTable consists of multiple subcomponents like table header, renderer and editor, so actually JTable is not a single component but a container with several descendants.
Imagine that you want to customize...
In the list of the things that needs improving in Swing, the implementation of listeners takes the first place. The problem is the fact that the order in which listeners are notified is not specified and it is not even guaranteed that your listeners will be notified after the Swing system listeners. Actually all listeners can be mixed together with any possible combination and it leads to two...
Generics doesn't work well with arrays. Everybody knows that you can't create a generified array,
but not many people really know what it was done this way.
A nice article from Brian Goetz helped me to understand the problem
when I studied the new features of JDK 5.
The arrays in java are covariant when generics are not. The following code clearly shows it:
String stringArray = new String[1...
Checked exceptions are painful. I could write a long article about it,
but there are more than enough good blogs describing this problem. My favorite article is written by Rod Waldhoff.
From my point of view the existence of the InvocationTargetException clearly shows the problem.
Imagine you call a method which throws an exception, you properly catches it
and then you decide to rewrite the...
We have all read the "Effective Java" book and know that we should prefer interfaces over abstract classes.
This is a known and respected pattern which should be used wherever possible.
However the years in the JDK team tauhgt me not to blindly trust
to good practices from the world of application programming.
A distinctive feature of the JDK is backward compatibility.
I truly love the Swing GUI toolkit, I enjoy its flexibility, opennes and great abilities.
I know that some people say that Swing is too difficult to learn,
and I partly accept it because it took me several years working in the Swing team
to get the whole picture of the AWT, Java 2D and the Swing itself.
The Swing history counts more then 10 years and it is definitely not about end.
Swing team welcomes the active SAF projects