just a shot, I do not know what the original dispose()-method is doing...
try to use the super.dispose() call as the last statement in your method
and tell me if this changes anything, I am curious myself ;o)

perhaps the problem arises from calling "getContentPane()" after
"dispose()".
"...the resources for these Components will be destroyed..." (see below for
the full cite
of the jdk docs) might mean that there is nothing left to "get" for the
"getContentPane()" method ;o)

from the jdk docs:
---------
public void dispose()

     Releases all of the native screen resources used by this Window, its
subcomponents, and all of its owned children. That is, the
     resources for these Components will be destroyed, any memory they
consume will be returned to the OS, and they will be marked
     as undisplayable. 

     The Window and its subcomponents can be made displayable again by
rebuilding the native resources with a subsequent call to
     pack or show. The states of the recreated Window and its subcomponents
will be identical to the states of these objects at the
     point where the Window was disposed (not accounting for additional
modifcations between those actions). 
----------



> We were over-riding the dispose method of JFrame to try to help garbage
> collection. The method was very simple as shown below.        
> 
>       public void dispose(){
>               analyzeModel = null;
>               analyzeJTable = null;
>               super.dispose();
>               getContentPane().removeAll();
>       }
> 
> The super.dispose() call generates the following exception:
> 
> java.lang.IllegalStateException: Can't dispose InputContext while it's
> active
>       at sun.awt.im.InputContext.dispose(InputContext.java:596)
>       at java.awt.Window$1$DisposeAction.run(Window.java:539)
>       at java.awt.Window.dispose(Window.java:549)
>       at dpak.purchase.RequisitionView.dispose(RequisitionView.java:726)
>       at
> dpak.purchase.RequisitionView$7.windowClosing(RequisitionView.java:441)
>       at java.awt.Window.processWindowEvent(Window.java:1098)
>       at javax.swing.JFrame.processWindowEvent(JFrame.java:266)
>       at java.awt.Window.processEvent(Window.java:1057)
>       at java.awt.Component.dispatchEventImpl(Component.java:3526)
> 
> 
> I'm a little fuzzy about what input context it is complaining about. Any
> ideas?
> 
> 
> 
> 
> To change your membership options, refer to:
> http://www.sys-con.com/java/list.cfm
> 

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm

Reply via email to