private static boolean noTabs(String action) { if (action.equals("logOut")) { MainRoboOfficeJFrame.getInstance().logout(); return true; } else if (action.equals("exit")) { MainRoboOfficeJFrame.getInstance().exit(); return true; } return false; }
private static void addTab(String tabName, JPanel panel) { container.addTab(tabName, panel); panel.setName(tabName); int index = container.indexOfTab(tabName); container.setToolTipTextAt(index, tabName); container.setSelectedIndex(index, true); container.setIconAt( index, new ImageIcon(FramePropertyLoader.getImageIcon("tabIcon").getImage())); resizeTab(MainRoboOfficeJFrame.getInstance().getWidth()); // tabTable.put(tabName,index); Tab currentTab = (Tab) panel; currentTab.setFocus(); }