Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Koila Malik   on Aug 06 In Java Category.

  
Question Answered By: Terry Williams   on Aug 06

i have change this line to the following line
if (button instanceof JButton)..
and true enough,i faced these problems...
below is the error when i click  the button..

java.lang.NullPointerException
at PasswordBox.actionPerformed(PasswordBox.java:80)
at javax.swing.AbstractButton.fireActionPerformed
(AbstractButton.java:1764)
at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed
(AbstractButton.java:1817)
at javax.swing.DefaultButtonModel.fireActionPerformed
(DefaultButtonModel.java:419)
at javax.swing.DefaultButtonModel.setPressed
(DefaultButtonModel.java:257)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased
(BasicButtonListener.java:245)
at java.awt.Component.processMouseEvent(Component.java:5093)
at java.awt.Component.processEvent(Component.java:4890)
at java.awt.Container.processEvent(Container.java:1566)
at java.awt.Component.dispatchEventImpl(Component.java:3598)
at java.awt.Container.dispatchEventImpl(Container.java:1623)
at java.awt.Component.dispatchEvent(Component.java:3439)
at java.awt.LightweightDispatcher.retargetMouseEvent
(Container.java:3450)
at java.awt.LightweightDispatcher.processMouseEvent
(Container.java:3165)
at java.awt.LightweightDispatcher.dispatchEvent
(Container.java:3095)
at java.awt.Container.dispatchEventImpl(Container.java:1609)
at java.awt.Window.dispatchEventImpl(Window.java:1585)
at java.awt.Component.dispatchEvent(Component.java:3439)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy
(EventDispatchThread.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run
(EventDispatchThread.java:99)

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on the frame should close when the button 'OK' is clic Or get search suggestion and latest updates.


Tagged: