public void setPreferredSize(Dimension dimension) { preferredSize = dimension;
public void setPreferredSize(int width, int height) { setPreferredSize(new Dimension(width, height));
    public void setPreferredSize(Dimension dimension) {        preferredSize = dimension;    }