Friday, October 5, 2007

Drag-n-drop on Mac

The Macs are the strange creatures. They have quite strange behavior of the DropTargetListener. It does not matter whether drag is accepted or rejected on dragEnter() and dragOver(). If the drop occurs, the drop() is called.
It is done more conveniently on Linux. After rejecting drag the drop() wont be called.

Japanese characters

I recently had a problem with Japanese. Namely, Japanese characters were not shown in a Swing application. Those characters were displayed fine in the window title only.
The solution was really easy. I've found it on Sun Swing forum. The problem was that application font did not supported Unicode characters. After changing it to e.g. "Arial Unicode MS" all characters were shown correctly.