Java source code & pieces

Problems and Bugs in Java

Transferring 'text/html'
from Java to native applications in Windows.

ZipFile and non Ascii chars
You can't get the contents of a ZipEntry which name contains 'umlauts' - precisely any char>127 - with Java 1.2 - 1.4. It's mostly all right with 1.1.8.

Graphics code for Java

Choose control points for cubic bezier curves
In common graphic environments (Java 2D, Postscript, wmf/emf/WinAPI, SVG) a cubic Bézier curve segment is drawn from two base- and two control points. Little application to play with.

ShapeIcon: use java.awt.Shape as javax.swing.Icon
A little wrapper around Shape to use it as an Icon, e.g. for JLabel, JButton, JList, JTable, JTree, etc.
Look into bezier.jar for source and usage. An example:

© July 2003 Peter Büttner