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 testing and debugging on JavaOne

Posted by alexfromsun on June 28, 2006 at 9:40 AM PDT

Hello everybody !

After spending a fantastic after JavaOne vacation, travalling Arizona and Florida I am happy to say hello to the comminity again.
Thanks to everyone who visited JavaOne and especially who visited my BOF session about Swing testing and debugging.

Swing team reveals their secrets !

Posted by alexfromsun on April 1, 2006 at 12:00 AM PST

Everybody knows that Swing and AWT behaviour can be changed with command line properties,

Debugging Swing, the final summary

Posted by alexfromsun on February 16, 2006 at 11:49 AM PST

It's taken some time to study all possible ways of detecting Event Dispatch Thread rule violations,
and now I feel I this topic is about to be closed.

But let me tell from the beginning:

Debugging Swing, the summary #1

Posted by alexfromsun on January 12, 2006 at 9:38 AM PST

Well, I've got more than 30 comments for the previous blog.

It's high time to summarize them and make up a conclusion.

There are two separate enhancements were suggested in comments:

  1. Make compiler move Swing methods to EDT automatically
  2. Invent something to make finding out-of-EDT methods invocations easier

Making Swing methods threadsafe, simple c

Debugging Swing - is it really difficult ?

Posted by alexfromsun on November 23, 2005 at 1:57 AM PST

Every experienced Swing developer knows that Swing components must be accessed from Event Dispatch Thread (EDT) only. Working with JComponents from any other thread may lead to unpredictable result.

Consider the following code:

import javax.swing.*;
import java.awt.*;
public class BadCode { public static void main(String args[]) { createGui(); }

TabComponents in action

Posted by alexfromsun on November 9, 2005 at 10:51 AM PST

It's been a lot of publications about adding "close" button to a tabbedPane, all solutions suggested are really inventive and not easy to find.

The story of one "not a bug"

Posted by alexfromsun on October 24, 2005 at 5:32 AM PDT

Recently I came across one interesting bug 4413412 which seems to discover very odd Swing behaviors and really looks like a bug. The problem is that JLabel seems to be transparent for MouseEvents so its parent can catch mouseClick event if we click on this label.