return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);
Dimension d = new Dimension(); Insets i = c.getInsets(); Document doc = textComponent.getDocument();   if (doc instanceof AbstractDocument) ((AbstractDocument) doc).readLock(); try {  d.width = (int) Math.min((long) rootView.getMaximumSpan(View.X_AXIS) + i.left + i.right, Integer.MAX_VALUE); d.height = (int) Math.min((long) rootView.getMaximumSpan(View.Y_AXIS) + i.top + i.bottom, Integer.MAX_VALUE); } finally { if (doc instanceof AbstractDocument) ((AbstractDocument) doc).readUnlock(); } return d;
  public Dimension getMaximumSize(JComponent c)  {    // Sun's implementation returns Integer.MAX_VALUE here, so do we.    return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);  }