public Dimension preferredSize(int columns)
{
if (isPreferredSizeSet())
return new Dimension(prefSize);
TextFieldPeer peer = (TextFieldPeer) getPeer ();
if (peer == null)
return new Dimension (getWidth(), getHeight());
return peer.getPreferredSize (columns);
}