Revision 100 org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.main/src/main/java/org/gvsig/tools/main/MainAction.java
MainAction.java | ||
---|---|---|
68 | 68 |
public void actionPerformed(ActionEvent e) { |
69 | 69 |
String title = getComponentTitle(); |
70 | 70 |
int index = tabbedPane.indexOfTab(title); |
71 |
if (index > -1) { |
|
72 |
tabbedPane.setSelectedIndex(index); |
|
73 |
} else { |
|
71 |
if (index <= -1) { |
|
74 | 72 |
tabbedPane.addTab(title, createComponent()); |
73 |
index = tabbedPane.indexOfTab(title); |
|
75 | 74 |
} |
75 |
tabbedPane.setSelectedIndex(index); |
|
76 | 76 |
} |
77 | 77 |
|
78 | 78 |
protected abstract JComponent createComponent(); |
Also available in: Unified diff