Results 1 to 2 of 2
  1. #1
    preeta is offline Member
    Join Date
    Apr 2011
    Posts
    4
    Rep Power
    0

    Default Hyperlink on a refreshing table throws exception

    I have a hyperlink in one column of my table. I am refreshing the table continuously, so when I click on the link I get a null pointer exception as table object becomes null due to refresh. The code where the exception happens is

    private void setDispatchComponent(MouseEvent e) {
    Component editorComponent = table.getEditorComponent();
    Point p = e.getPoint();



    Is there a work around for this.

    The exception I get is

    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at javax.swing.plaf.basic.BasicTableUI$Handler.setDis patchComponent(BasicTableUI.java:900)
    at javax.swing.plaf.basic.BasicTableUI$Handler.adjust Selection(BasicTableUI.java:1079)
    at javax.swing.plaf.basic.BasicTableUI$Handler.mouseP ressed(BasicTableUI.java:1008)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEvent Multicaster.java:263)
    at java.awt.Component.processMouseEvent(Component.jav a:6286)
    at javax.swing.JComponent.processMouseEvent(JComponen t.java:3267)
    at java.awt.Component.processEvent(Component.java:605 4)
    at java.awt.Container.processEvent(Container.java:204 1)
    at java.awt.Component.dispatchEventImpl(Component.jav a:4652)
    at java.awt.Container.dispatchEventImpl(Container.jav a:2099)
    at java.awt.Component.dispatchEvent(Component.java:44 82)
    at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:4577)
    at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:4235)
    at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:4168)
    at java.awt.Container.dispatchEventImpl(Container.jav a:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2478 )
    at java.awt.Component.dispatchEvent(Component.java:44 82)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.j ava:644)
    at java.awt.EventQueue.access$000(EventQueue.java:85)
    at java.awt.EventQueue$1.run(EventQueue.java:603)
    at java.awt.EventQueue$1.run(EventQueue.java:601)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectio nPrivilege(AccessControlContext.java:87)
    at java.security.AccessControlContext$1.doIntersectio nPrivilege(AccessControlContext.java:98)
    at java.awt.EventQueue$2.run(EventQueue.java:617)
    at java.awt.EventQueue$2.run(EventQueue.java:615)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectio nPrivilege(AccessControlContext.java:87)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java: 614)
    at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:122)

    Any help would of great.

    thanks
    P

  2. #2
    preeta is offline Member
    Join Date
    Apr 2011
    Posts
    4
    Rep Power
    0

    Default

    Haven't got any response to this issue, is this not possible to implement, I am kind of new to this, please let me know if you need any more info

    thanks
    P

Similar Threads

  1. throws exception
    By simorgh in forum New To Java
    Replies: 1
    Last Post: 07-30-2010, 12:24 AM
  2. JButton: getLocationOnScreen() throws Exception
    By ExceptionHandler in forum AWT / Swing
    Replies: 10
    Last Post: 02-15-2010, 01:38 PM
  3. Applet throws exception while recording
    By Basit56 in forum Java Applets
    Replies: 1
    Last Post: 08-20-2009, 01:42 PM
  4. Exception throws when I read File
    By Juggler in forum New To Java
    Replies: 11
    Last Post: 08-18-2008, 06:09 PM
  5. throws Exception
    By javaplus in forum New To Java
    Replies: 1
    Last Post: 11-06-2007, 07:32 PM

Posting Permissions

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