Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: nullPointerException with Nimbus l&f

  1. #1
    Junior Member
    Join Date
    Feb 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default nullPointerException with Nimbus l&f

    Hello ! Please help me !

    I've got the following exception when I try to set Nimbus l&f (GTK has the same pb, whereas Motif and Metal work well)

    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at javax.swing.plaf.synth.SynthTableUI.paintCell(Synt hTableUI.java:625)
    at javax.swing.plaf.synth.SynthTableUI.paintCells(Syn thTableUI.java:521)
    at javax.swing.plaf.synth.SynthTableUI.paint(SynthTab leUI.java:305)
    at javax.swing.plaf.synth.SynthTableUI.update(SynthTa bleUI.java:234)
    at javax.swing.JComponent.paintComponent(JComponent.j ava:752)
    at javax.swing.JComponent.paint(JComponent.java:1029)
    at javax.swing.JComponent.paintChildren(JComponent.ja va:862)
    at javax.swing.JComponent.paint(JComponent.java:1038)
    at javax.swing.JViewport.paint(JViewport.java:747)
    at javax.swing.JComponent.paintChildren(JComponent.ja va:862)
    at javax.swing.JComponent.paint(JComponent.java:1038)
    at javax.swing.JComponent.paintChildren(JComponent.ja va:862)
    at javax.swing.JSplitPane.paintChildren(JSplitPane.ja va:1030)
    at javax.swing.JComponent.paint(JComponent.java:1038)
    at javax.swing.JComponent.paintChildren(JComponent.ja va:862)
    at javax.swing.JComponent.paint(JComponent.java:1038)
    at javax.swing.JComponent.paintToOffscreen(JComponent .java:5124)
    at javax.swing.BufferStrategyPaintManager.paint(Buffe rStrategyPaintManager.java:278)
    at javax.swing.RepaintManager.paint(RepaintManager.ja va:1224)
    at javax.swing.JComponent._paintImmediately(JComponen t.java:5072)
    at javax.swing.JComponent.paintImmediately(JComponent .java:4882)
    at javax.swing.RepaintManager.paintDirtyRegions(Repai ntManager.java:785)
    at javax.swing.RepaintManager.paintDirtyRegions(Repai ntManager.java:713)
    at javax.swing.RepaintManager.seqPaintDirtyRegions(Re paintManager.java:693)
    at javax.swing.SystemEventQueueUtilities$ComponentWor kRequest.run(SystemEventQueueUtilities.java:125)
    at java.awt.event.InvocationEvent.dispatch(Invocation Event.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.j ava:641)
    at java.awt.EventQueue.access$000(EventQueue.java:84)
    at java.awt.EventQueue$1.run(EventQueue.java:602)
    at java.awt.EventQueue$1.run(EventQueue.java:600)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectio nPrivilege(AccessControlContext.java:87)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java: 611)
    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)

    I've add to see what helped :
    EventQueue queue = Toolkit.getDefaultToolkit().getSystemEventQueue();
    queue.push(new EventQueue() {
    @Override
    protected void dispatchEvent(AWTEvent event) {
    // System.out.println("info " + event.toString());
    try {
    super.dispatchEvent(event);
    } catch (Throwable t) {
    System.out.println(super.getCurrentEvent());
    System.out.println(event.getSource());
    t.printStackTrace();
    System.out.println(t.getMessage() + " " + t.getClass());
    }
    }
    });
    and I get :
    java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=javax.swing.SystemEven tQueueUtilities$ComponentWorkRequest@64959a7a,noti fier=null,catchExceptions=false,when=1360338783958] on sun.awt.X11.XToolkit@472462b3
    java.lang.NullPointerException
    sun.awt.X11.XToolkit@472462b3
    null

    I've tried also to add the long process into SwingWorker, or call UIManager.setLookAndFeel("com.sun.java.swing.plaf. nimbus.NimbusLookAndFeel") after the initialization of my Frame, but still don't work.


  2. #2
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    Posts
    1,130
    My Mood
    Cynical
    Thanks
    64
    Thanked 140 Times in 135 Posts

    Default Re: nullPointerException with Nimbus l&f

    Why the double post?? Please don't do this.

    Locking.

Similar Threads

  1. nullPointerException with Nimbus l&f
    By JaimeJava in forum What's Wrong With My Code?
    Replies: 2
    Last Post: February 11th, 2013, 08:06 AM
  2. Replies: 0
    Last Post: November 16th, 2011, 08:29 AM
  3. Bold font in JTabbedpane in Nimbus L&F
    By sponarun in forum What's Wrong With My Code?
    Replies: 0
    Last Post: February 28th, 2011, 02:09 AM
  4. JTable gridlines not showing in a nimbus L&F
    By chronoz13 in forum AWT / Java Swing
    Replies: 0
    Last Post: February 22nd, 2010, 07:45 AM