Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at main.Login$1.actionPerformed(Login.java:110)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

解决方案 »

  1.   

    Login.java文件第110行有对象是Null的,仔细查查这里的代码。
      

  2.   


    这些Unknown source原因应该是,Login.java:110行的NullPointerException导致引用到swing包的api发生异常。。而swing的jar包没有关联到swing的源码
      

  3.   

    可以在myeclipse中将swing jar包关联到其源码上就行。。用处是:为了调试swing的内部api执行时用到
      

  4.   

    main.Login类中某个匿名内部类的actionPerformed方法中出现了null对象不过这应该是个mouseRelease事件吧/**
       * Accept a mouse release event and set the button's 
       * "pressed" property to <code>true</code>, if the model
       * is armed. If the model is not armed, ignore the event.
       *
       * @param e The mouse release event to accept
       */
      public void mouseReleased(MouseEvent e)
      {
        if (e.getSource() instanceof AbstractButton)
          {
            AbstractButton button = (AbstractButton) e.getSource();
            ButtonModel model = button.getModel();
            if ((e.getModifiersEx() & InputEvent.BUTTON1_DOWN_MASK) != 0)
              {
                // It is important that these transitions happen in this order.
                model.setPressed(false);
                model.setArmed(false);
              }
          }
      }
      

  5.   

    这些Unknown source原因应该是,Login.java:110行的NullPointerException导致引用到swing包的api发生异常。。而swing的jar包没有关联到swing的源码