Ejemplo n.º 1
0
  public static void openTabThreaded(String action) {
    if (noTabs(action)) {
      return;
    }
    String tabName = ActionMappingLoader.getTabName(action);
    if (exists(tabName)) {
      switchTo(tabName);
      return;
    }

    String tabClass = tabLocation + ActionMappingLoader.getTabClass(action);
    try {

      JPanel panel = (JPanel) Class.forName(tabClass).newInstance();
      addTab(tabName, panel);

    } catch (ClassNotFoundException | InstantiationException | IllegalAccessException ex) {
      Thread.currentThread().interrupt();
    }
  }