Results 1 to 2 of 2
  1. #1
    Javid is offline Member
    Join Date
    Aug 2008
    Posts
    3
    Rep Power
    0

    Question Error: Exception during event dispatch!

    import javax.swing.JOptionPane;
    public class Test {
    public static void main(String[] args) {
    String Str;
    Str = JOptionPane.showInputDialog(":D");
    JOptionPane.showMessageDialog(null, Str);
    System.exit(0);
    }
    }

    I compiled this code in eclipse with "java-1.5.0-gcj-4.3-1.5.0.0" and this error occurs:
    what is the problem? :confused:


    Exception during event dispatch:
    java.lang.ArithmeticException: / by zero
    at javax.swing.text.PlainView.paint(libgcj.so.90)
    at javax.swing.text.FieldView.paint(libgcj.so.90)
    at javax.swing.plaf.basic.BasicTextUI$RootView.paint( libgcj.so.90)
    at javax.swing.plaf.basic.BasicTextUI.paintSafely(lib gcj.so.90)
    at javax.swing.plaf.basic.BasicTextUI.paint(libgcj.so .90)
    at javax.swing.plaf.basic.BasicTextUI.update(libgcj.s o.90)
    at javax.swing.JComponent.paintComponent(libgcj.so.90 )
    at javax.swing.JComponent.paint(libgcj.so.90)
    at javax.swing.JComponent.paintChildren(libgcj.so.90)
    at javax.swing.JComponent.paint(libgcj.so.90)
    at javax.swing.JComponent.paintChildren(libgcj.so.90)
    at javax.swing.JComponent.paint(libgcj.so.90)
    at javax.swing.JComponent.paintChildren(libgcj.so.90)
    at javax.swing.JComponent.paint(libgcj.so.90)
    at javax.swing.JComponent.paintChildren(libgcj.so.90)
    at javax.swing.JComponent.paint(libgcj.so.90)
    at javax.swing.JComponent.paintChildren(libgcj.so.90)
    at javax.swing.JComponent.paint(libgcj.so.90)
    at javax.swing.JLayeredPane.paint(libgcj.so.90)
    at javax.swing.JComponent.paintChildren(libgcj.so.90)
    at javax.swing.JComponent.paintDoubleBuffered(libgcj. so.90)
    at javax.swing.JComponent.paint(libgcj.so.90)
    at java.awt.Container$GfxPaintVisitor.visit(libgcj.so .90)
    at java.awt.Container.visitChild(libgcj.so.90)
    at java.awt.Container.visitChildren(libgcj.so.90)
    at java.awt.Container.paint(libgcj.so.90)
    at gnu.java.awt.peer.gtk.GtkComponentPeer.paintCompon ent(libgcj.so.90)
    at gnu.java.awt.peer.gtk.GtkComponentPeer.handleEvent (libgcj.so.90)
    at java.awt.Component.dispatchEventImpl(libgcj.so.90)
    at java.awt.Container.dispatchEventImpl(libgcj.so.90)
    at java.awt.Window.dispatchEventImpl(libgcj.so.90)
    at java.awt.Component.dispatchEvent(libgcj.so.90)
    at java.awt.EventQueue.dispatchEvent(libgcj.so.90)
    at java.awt.EventDispatchThread.run(libgcj.so.90)
    Exception during event dispatch:
    java.lang.ArithmeticException: / by zero
    at javax.swing.text.PlainView.paint(libgcj.so.90)
    at javax.swing.text.FieldView.paint(libgcj.so.90)
    at javax.swing.plaf.basic.BasicTextUI$RootView.paint( libgcj.so.90)
    at javax.swing.plaf.basic.BasicTextUI.paintSafely(lib gcj.so.90)
    at javax.swing.plaf.basic.BasicTextUI.paint(libgcj.so .90)
    at javax.swing.plaf.basic.BasicTextUI.update(libgcj.s o.90)
    at javax.swing.JComponent.paintComponent(libgcj.so.90 )
    at javax.swing.JComponent.paint(libgcj.so.90)
    at javax.swing.JComponent.paintDoubleBuffered(libgcj. so.90)
    at javax.swing.JComponent.paintImmediately2(libgcj.so .90)
    at javax.swing.JComponent.paintImmediately(libgcj.so. 90)
    at javax.swing.JComponent.paintImmediately(libgcj.so. 90)
    at javax.swing.RepaintManager.paintDirtyRegions(libgc j.so.90)
    at javax.swing.RepaintManager$RepaintWorker.run(libgc j.so.90)
    at java.awt.event.InvocationEvent.dispatch(libgcj.so. 90)
    at javax.swing.RepaintManager$RepaintWorkerEvent.disp atch(libgcj.so.90)
    at java.awt.EventQueue.dispatchEvent(libgcj.so.90)
    at java.awt.EventDispatchThread.run(libgcj.so.90)

  2. #2
    roots's Avatar
    roots is offline Moderator
    Join Date
    Jan 2008
    Location
    Dallas
    Posts
    293
    Rep Power
    7

    Default

    Its running fine with me .. try running the code again .. if it gives the same problem .. post a bug report Bug Database
    dont worry newbie, we got you covered.

Similar Threads

  1. Replies: 0
    Last Post: 07-07-2008, 07:10 AM
  2. JSF error+exception
    By Peter in forum SWT / JFace
    Replies: 1
    Last Post: 07-04-2007, 06:29 AM
  3. Replies: 2
    Last Post: 07-04-2007, 05:23 AM
  4. Difference between error and exception
    By harinath chakrapani in forum New To Java
    Replies: 1
    Last Post: 06-19-2007, 08:49 AM
  5. tomcat exception-error
    By Nick15 in forum Eclipse
    Replies: 2
    Last Post: 05-11-2007, 01:32 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
  •