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.