if (!tabPane.isValid()) tabPane.validate();
  public void paint(Graphics g, JComponent c)  {    if (tabPane.getTabCount() == 0)      return;    if (tabPane.getTabLayoutPolicy() == JTabbedPane.WRAP_TAB_LAYOUT)      paintTabArea(g, tabPane.getTabPlacement(), tabPane.getSelectedIndex());    paintContentBorder(g, tabPane.getTabPlacement(), tabPane.getSelectedIndex());  }