Index: MainWindow.java =================================================================== RCS file: /cvs/core/src/org/netbeans/core/windows/MainWindow.java,v retrieving revision 1.43 diff -c -r1.43 MainWindow.java *** MainWindow.java 3 May 2002 13:09:12 -0000 1.43 --- MainWindow.java 20 May 2002 14:32:18 -0000 *************** *** 196,202 **** if (enableFixedSwitcher()) { JPanel southPanel = new JPanel(); southPanel.setLayout(new BorderLayout()); ! WorkspaceSwitcher ws = new WorkspaceSwitcher(wm); southPanel.add(ws.getComponent(), BorderLayout.WEST); Component status = StatusLine.createLabel(); southPanel.add(status, BorderLayout.CENTER); --- 196,202 ---- if (enableFixedSwitcher()) { JPanel southPanel = new JPanel(); southPanel.setLayout(new BorderLayout()); ! WorkspaceSwitcher ws = WorkspaceSwitcher.getInstance(); southPanel.add(ws.getComponent(), BorderLayout.WEST); Component status = StatusLine.createLabel(); southPanel.add(status, BorderLayout.CENTER); Index: WorkspaceSwitcher.java =================================================================== RCS file: /cvs/core/src/org/netbeans/core/windows/WorkspaceSwitcher.java,v retrieving revision 1.16 diff -c -r1.16 WorkspaceSwitcher.java *** WorkspaceSwitcher.java 3 May 2002 13:09:12 -0000 1.16 --- WorkspaceSwitcher.java 20 May 2002 14:32:19 -0000 *************** *** 46,51 **** --- 46,53 ---- public final class WorkspaceSwitcher { private WindowManagerImpl pool; static TabControl control; + /* Singleton instance of workspace switcher */ + private static WorkspaceSwitcher workspaceSwitcher; private ArrayList workspaces; private HashMap listeners; /** for listener which is using for navigateing in workspaces by keys */ *************** *** 292,299 **** } /** Singleton accessor method for this workspace switcher */ ! public static WorkspaceSwitcher getInstance () { ! return new WorkspaceSwitcher(WindowManagerImpl.getDefault()); } /** Utility method that strips ampersand char from the string --- 294,304 ---- } /** Singleton accessor method for this workspace switcher */ ! public synchronized static WorkspaceSwitcher getInstance () { ! if (workspaceSwitcher == null) { ! workspaceSwitcher = new WorkspaceSwitcher(WindowManagerImpl.getDefault()); ! } ! return workspaceSwitcher; } /** Utility method that strips ampersand char from the string