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

    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 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.
    if (ichwar == offline) {
    System.out.println("ichwar is busy");}

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

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
  •