Read and draw a local image.
This is the error NetBeans gives me.
Quote:
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: cropstuff.CropStuffView cannot be cast to java.awt.image.ImageObserver
at cropstuff.CropStuffView.jButton1MouseClicked(CropS tuffView.java:231)
at cropstuff.CropStuffView.access$800(CropStuffView.j ava:35)
at cropstuff.CropStuffView$4.mouseClicked(CropStuffVi ew.java:181)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEvent Multicaster.java:270)
at java.awt.Component.processMouseEvent(Component.jav a:6111)
at javax.swing.JComponent.processMouseEvent(JComponen t.java:3276)
at java.awt.Component.processEvent(Component.java:587 3)
at java.awt.Container.processEvent(Container.java:210 5)
at java.awt.Component.dispatchEventImpl(Component.jav a:4469)
at java.awt.Container.dispatchEventImpl(Container.jav a:2163)
at java.awt.Component.dispatchEvent(Component.java:42 95)
at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:4461)
at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:4134)
at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:4055)
at java.awt.Container.dispatchEventImpl(Container.jav a:2149)
at java.awt.Window.dispatchEventImpl(Window.java:2478 )
at java.awt.Component.dispatchEvent(Component.java:42 95)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 604)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:275)
at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:200)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:177)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:138)
So I'm just too new to java to be able to make any sense out of that error message.