Multiple SimpleGames into the same app

Hi,



I try to create multiple SimpleGame canvases embedded into a Swing or SWT app. When the first SimpleGame is opened everything is fine. Trying to open the second one, throws the following exception on this call: MouseInput.setProvider(MouseInput.INPUT_AWT);



[pre]java.lang.IllegalStateException: Provider may only be changed before input is created!

at com.jme.input.MouseInput.setProvider(MouseInput.java:110)

at org.geocraft.ui.internal.volume2.VolumeView.initGame(VolumeView.java:82)

at org.mw3d.jme.JMEView.createPartControl(JMEView.java:43)

at org.geocraft.ui.internal.volume2.VolumeView.createPartControl(VolumeView.java:183)

at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:371)

at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:230)

at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:594)

at org.eclipse.ui.internal.Perspective.showView(Perspective.java:2091)

at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1019)

at org.eclipse.ui.internal.WorkbenchPage$19.run(WorkbenchPage.java:3669)

at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)

at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3666)

at org.geocraft.ui.internal.volume2.VolumePlot2.run(VolumePlot2.java:37)

at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)

at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)

at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:582)

at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:499)

at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:410)

at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:83)

at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002)

at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3773)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3372)

at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2375)

at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2339)

at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2205)

at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:478)

at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)

at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:473)

at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)

at org.geocraft.Application.start(Application.java:34)

at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:362)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)

at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)

at org.eclipse.equinox.launcher.Main.run(Main.java:1236)

at org.eclipse.equinox.launcher.Main.main(Main.java:1212)[/pre]



Thanks,



Dan