Copy from svn.aswing.org r1303