JTabbedPane p = (JTabbedPane)e.getSource(); int index = p.getSelectedIndex(); if (!p.getTitleAt(index).equals(LangTool.getString("ss.labelConnections"))) connectButton.setEnabled(false); else connectButton.setEnabled(true); }
JTabbedPane p = (JTabbedPane) e.getSource(); int index = p.getSelectedIndex(); if (!p .getTitleAt(index) .equals(LangTool.getString("ss.labelConnections"))) { connectButton.setEnabled(false); this.setTitle(LangTool.getString("ss.title") + " - " + LangTool.getString("ss.labelOptions1")); } else { this.setTitle(LangTool.getString("ss.title") + " - " + LangTool.getString("ss.labelConnections")); connectButton.setEnabled(true); } }
   public void stateChanged(ChangeEvent e) {      JTabbedPane p = (JTabbedPane)e.getSource();      int index = p.getSelectedIndex();      if (!p.getTitleAt(index).equals(LangTool.getString("ss.labelConnections")))         connectButton.setEnabled(false);      else         connectButton.setEnabled(true);   }