Results 1 to 2 of 2
  1. #1
    ichwar is offline Member
    Join Date
    Jul 2009
    Rolesville, North Carolina
    Rep Power

    Default Read and draw a local image.

    This is the error NetBeans gives me.
    Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: cropstuff.CropStuffView cannot be cast to java.awt.image.ImageObserver
    at cropstuff.CropStuffView.jButton1MouseClicked(CropS
    at cropstuff.CropStuffView.access$800(CropStuffView.j ava:35)
    at cropstuff.CropStuffView$4.mouseClicked(CropStuffVi
    at java.awt.AWTEventMulticaster.mouseClicked(AWTEvent
    at java.awt.Component.processMouseEvent(Component.jav a:6111)
    at javax.swing.JComponent.processMouseEvent(JComponen
    at java.awt.Component.processEvent( 3)
    at java.awt.Container.processEvent( 5)
    at java.awt.Component.dispatchEventImpl(Component.jav a:4469)
    at java.awt.Container.dispatchEventImpl(Container.jav a:2163)
    at java.awt.Component.dispatchEvent( 95)
    at java.awt.LightweightDispatcher.retargetMouseEvent(
    at java.awt.LightweightDispatcher.processMouseEvent(C
    at java.awt.LightweightDispatcher.dispatchEvent(Conta
    at java.awt.Container.dispatchEventImpl(Container.jav a:2149)
    at java.awt.Window.dispatchEventImpl( )
    at java.awt.Component.dispatchEvent( 95)
    at java.awt.EventQueue.dispatchEvent( 604)
    at java.awt.EventDispatchThread.pumpOneEventForFilter s(
    at java.awt.EventDispatchThread.pumpEventsForFilter(E
    at java.awt.EventDispatchThread.pumpEventsForHierarch y(
    at java.awt.EventDispatchThread.pumpEvents(EventDispa
    at java.awt.EventDispatchThread.pumpEvents(EventDispa
    So I'm just too new to java to be able to make any sense out of that error message.
    if (ichwar == offline) {
    System.out.println("ichwar is busy");}

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power

Similar Threads

  1. How to read xml file located in local system using Java
    By java_kick in forum Advanced Java
    Replies: 2
    Last Post: 04-06-2009, 11:28 PM
  2. Unable to draw buffered image
    By pedjasmek in forum Java 2D
    Replies: 7
    Last Post: 08-08-2008, 03:49 PM
  3. How to read an image in Java
    By Java Tip in forum java.awt
    Replies: 0
    Last Post: 06-25-2008, 10:30 AM
  4. Loading Image from local directory
    By nancyhung in forum Advanced Java
    Replies: 0
    Last Post: 01-29-2008, 03:46 PM
  5. how to draw an image inside of jscrollpane
    By paty in forum Java Applets
    Replies: 1
    Last Post: 07-24-2007, 12:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts