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

Making Rainbow: Spotlight effect and soft clipping

Posted by alexfromsun on November 29, 2007 at 11:32 AM PST

Few weeks ago I submitted a session for the next JavaOne and it reminded me the previous session which we presented with Kirill

Debug Swing repainting

Posted by alexfromsun on November 6, 2007 at 11:22 AM PST

As everybody knows if you need to repaint a Swing component you should call Component.repaint() method,
another well-known tip for the fast painting is:


If only part of your component needs to be updated, make paint requests using a

Why I don't use Swing hacks (continuation)

Posted by alexfromsun on October 9, 2007 at 4:50 AM PDT

In one of my previous blogs I answered to Kirill's comment that some of techniques he described in his Swing painting pipeline overview are "not good enough for me",

Why I don't use Swing hacks (in production code)

Posted by alexfromsun on September 27, 2007 at 7:03 AM PDT

One of the big part of my work is fixing bugs in Swing but not all of them are to be fixed, some of them are closed because they describe the situations when someone uses Swing in undocumented way or trying to make Swing do something which it doesn't support.

My favourite example is so-called "Blocking GlassPane".

Tag game: better later than never

Posted by alexfromsun on January 27, 2007 at 6:01 AM PST

A few weeks ago Chris
tagged 4 people at once !

KISS principle: JXButtonGroupPanel followup

Posted by alexfromsun on November 1, 2006 at 10:28 AM PST

In one of my previous blog I presented a component which enables arrow keys to transfer focus and selection for Swing buttons.

And it worked very well, but there were two things which worried me

  • JXButtonGroupPanel offered a different way to bind buttons to a ButtonGroup

Crazy JButton painters

Posted by alexfromsun on October 5, 2006 at 10:51 AM PDT

Inspired by some latest blogs I decided to find the most hacky and crazy method to paint on a component


I chose JButton as the most well-known component to play with



The goal is to implement some custom painting to a button without subclassing it and with no custom UI delegate

Custom component

As you probably know all Swing components are Containers,

A well-behaved GlassPane

Posted by alexfromsun on September 20, 2006 at 12:02 PM PDT

I have seen a lot of custom GlassPane tricks, which use GlassPane to "disable" the frame, to provide a visual effects during the lengthy tasks or to give more rich feedback during drag and drop etc...

The distinctive feature of that tricks is that GlassPane is shown only temporarily,

The ButtonGroup of my dreams

Posted by alexfromsun on August 23, 2006 at 10:34 AM PDT

I have fixed quite a lot of bugs and RFE's in Swing for Java 1.6 and don't really remember all of them,
but I do remember one remarkable bug because it took me unusually long time to find a good solution

and after I had fixed it I had to fix several regressions and finally
I completely rolled the fix back

JXTransformer: The power of a real Swing !

Posted by alexfromsun on July 17, 2006 at 8:40 AM PDT

A long time ago I wanted to have a component which could paint rotated text for my application

I definitely could create my own component, override paintComponent(), implement correct resizing etc...