I have a Java Swing project that works great on both Windows and Ubuntu. I did not have any Macs, so I could not verify this; I used the Nimbus theme as the standard for this project.
My friend recently tested the same project in both Eclipse and exported jar, and it gives errors that do not apply to any specific Java class that I made.
It shows a graphical interface, but sometimes it is stored, or sometimes the menu is missing.
Here is the version of errors displayed when starting the GUI:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at com.apple.laf.AquaMenuPainter.paintMenuBarBackground(AquaMenuPainter.java:123) at com.apple.laf.AquaMenuUI.paintBackground(AquaMenuUI.java:57) at com.apple.laf.AquaMenuPainter.paintMenuItem(AquaMenuPainter.java:160) at com.apple.laf.AquaMenuUI.paintMenuItem(AquaMenuUI.java:35) at javax.swing.plaf.basic.BasicMenuItemUI.paint(BasicMenuItemUI.java:452) at javax.swing.plaf.basic.BasicMenuItemUI.update(BasicMenuItemUI.java:448) at javax.swing.JComponent.paintComponent(JComponent.java:752) at javax.swing.JComponent.paint(JComponent.java:1029) at javax.swing.JComponent.paintChildren(JComponent.java:862) at javax.swing.JComponent.paint(JComponent.java:1038) at javax.swing.JComponent.paintChildren(JComponent.java:862) at javax.swing.JComponent.paint(JComponent.java:1038) at javax.swing.JLayeredPane.paint(JLayeredPane.java:567) at javax.swing.JComponent.paintChildren(JComponent.java:862) at javax.swing.JComponent.paint(JComponent.java:1038) at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:34) at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60) at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
Could you tell me what might be the problem, or is there any specific Look and Feel theme that I should use on a Mac? Nimbus is not supported on Mac, and if so, what should I use?
source share