Skip to main content

Alexander Potochkin

Alexander Potochkin is an engineer on the Swing team. He enjoys solving puzzles, traveling to different countries and always returning to Saint Petersburg, Russia.

 

alexfromsun's blog

Swing in a better world: Static fields vs AppContext

Posted by alexfromsun on February 9, 2012 at 1:59 AM PST

The problems that are related to the application context might be invisible from the outside of the Swing core libraries, but it has been a big deal for the Swing toolkit developers. Every time when you create a mutable static field in a Swing class you potentially introduce a security whole. It is quite surprising that an ordinary pattern of the Java language becomes a problem.

Swing in a better world: Compound components

Posted by alexfromsun on September 7, 2011 at 9:13 AM PDT

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.

Swing in a better world: Listeners

Posted by alexfromsun on June 15, 2011 at 9:37 AM PDT

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.

Swing in a better world: Generics and arrays

Posted by alexfromsun on May 5, 2011 at 11:37 AM PDT

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.

Swing in a better world: Checked exceptions

Posted by alexfromsun on March 21, 2011 at 11:33 AM PDT

Checked exceptions are painful. I could write a long article about it,
but there are more than enough good blogs describing this problem.

Swing in a better world: java interfaces

Posted by alexfromsun on March 11, 2011 at 2:12 AM PST

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.

Swing in a better world

Posted by alexfromsun on March 9, 2011 at 11:58 PM PST

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 alternative Swing frameworks

Posted by alexfromsun on November 16, 2009 at 6:34 AM PST

Hello Swing community

While the SAF project is on hold, the Swing team welcomes the active development of the alternative implementations of the Swing framework.

SAF and JDK7

Posted by alexfromsun on August 19, 2009 at 8:11 AM PDT

Hello Swing community

After much discussion it's become clear that the Swing Application Framework API as it is today hasn't reached
consensus and we feel still needs further design work done.

Since the SAF API was committed to milestone 5 of JDK7 and that time is already here,
this date is now impossible, and we need to decommit SAF f

JDK 7 is moving forward!

Posted by alexfromsun on May 4, 2009 at 8:29 AM PDT

Java desktop team is working hard to move JDK7 forward.

I am happy to announce that Nimbus Look and Feel has been forward ported to JDK 7.
Among all other changes, the latest build #b57
contains the fix for