Code example for InvocationTargetException

Methods: printStackTrace

0
            } 
            catch (IllegalAccessException e) {
                e.printStackTrace();
            } 
            catch (InvocationTargetException e) {
                e.printStackTrace();
            } 
        } 
        else { 
 
            if (this.mouseWheelHandler != null) {
                // use reflection to deregister the mouseWheelHandler 
                try { 
                    Class mwl = Class.forName(
                            "java.awt.event.MouseWheelListener"); 
                    Class c2 = ChartPanel.class;
                    Method m = c2.getMethod("removeMouseWheelListener",
                            new Class[] {mwl});
                    m.invoke(this, new Object[] {this.mouseWheelHandler});
                }