Dimitry,

please take my version to test it. With your version I get the same result.
My (also former) version is:
       public boolean close(boolean force) {
               // (DP) The mode controller does not close the map
                   MapModule module = getMapModule();
                   // FIXME: This is not correct, as this class should
not ask somebody.
                   // This class is only a list!
            boolean closingNotCancelled =
module.getModeController().close(force, this);
            if (!closingNotCancelled) {
               return false; }   
           
            String toBeClosed = getMapModule().toString();
            mapModules.remove(toBeClosed);
            if (mapModules.isEmpty()) {
            /*Keep the current running mode*/
            setMapModule(null, module.getMode());
        } else {
            changeToMapModule((String)
mapModules.keySet().iterator().next());
        }
            listener.afterMapClose(module, module.getMode());
            return true;
            }

Thanks, Chris


Dimitry Polivaev schrieb:
> Java 1.6.0_02, Windows 2000:
>
> Exception in thread "AWT-EventQueue-0" 
> java.lang.ArrayIndexOutOfBoundsException: -1
>       at java.util.Vector.elementAt(Vector.java:430)
>       at javax.swing.JTabbedPane.getTitleAt(JTabbedPane.java:1089)
>       at 
> javax.swing.plaf.basic.BasicTabbedPaneUI$Handler.componentAdded(BasicTabbedPaneUI.java:3677)
>       at java.awt.Container.processContainerEvent(Container.java:2084)
>       at java.awt.Container.processEvent(Container.java:2055)
>       at java.awt.Component.dispatchEventImpl(Component.java:4410)
>       at java.awt.Container.dispatchEventImpl(Container.java:2116)
>       at java.awt.Component.dispatchEvent(Component.java:4240)
>       at java.awt.Container.addImpl(Container.java:1079)
>       at javax.swing.JTabbedPane.setComponentAt(JTabbedPane.java:1541)
>       at freemind.main.FreeMind$2.stateChanged(FreeMind.java:331)
>       at javax.swing.JTabbedPane.fireStateChanged(JTabbedPane.java:400)
>       at javax.swing.JTabbedPane.removeTabAt(JTabbedPane.java:965)
>       at freemind.main.FreeMind$3.afterMapClose(FreeMind.java:388)
>       at 
> freemind.controller.MapModuleManager$MapModuleChangeObserverCompound.afterMapClose(MapModuleManager.java:107)
>       at freemind.controller.MapModuleManager.close(MapModuleManager.java:285)
>       at freemind.controller.Controller.close(Controller.java:668)
>       at 
> freemind.controller.Controller$CloseAction.actionPerformed(Controller.java:914)
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Freemind-developer mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freemind-developer
>
>   

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freemind-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemind-developer

Reply via email to