private void showAntView(boolean treeView) { AntOutputView oldView = getOutputView(treeView); AntOutputView newView = getOutputView(!treeView); myCurrentView = newView; myMessagePanel.remove(oldView.getComponent()); myMessagePanel.add(newView.getComponent(), BorderLayout.CENTER); myMessagePanel.validate(); JComponent component = IdeFocusTraversalPolicy.getPreferredFocusedComponent(myMessagePanel); component.requestFocus(); repaint(); }
public void removeProgressPanel() { if (myProgressPanel != null) { myMessagePanel.remove(myProgressPanel); // fix of 9377 SwingUtilities.invokeLater( new Runnable() { public void run() { myMessagePanel.validate(); } }); myProgressPanel = null; } }