Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7842343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:17:50+00:00 2026-06-02T16:17:50+00:00

I have a Java Swing project which works fine on both Windows and Ubuntu.

  • 0

I have a Java Swing project which works fine on both Windows and Ubuntu. I did not have any Macs so I could not test it; I have used the Nimbus theme as the standard for this project.

Now, recently my friend tested the same project both in Eclipse and exported jar, and it is giving errors that do not refer to any specific Java class that I have made.

It does show the GUI, but sometimes it sticks, or sometimes menus are missing.

Here is a stripped down version of errors shown while launching 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 could be the problem, or is there any specific Look and Feel theme I should be using on Mac? Is Nimbus not supported on Mac and if so then what should I use?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T16:17:53+00:00Added an answer on June 2, 2026 at 4:17 pm

    I wouldn’t touch the theme in OS X, it is awesome automatically 😀

    Just make sure you don’t change the theme when you are on Mac.

    String osName = System.getProperty("os.name").toLowerCase();
    if (!osName.contains("mac")) // if not on mac
    {
       // set nimbus
    }
    // otherwise, do nothing. It goes automatically to Aqua.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my java-swing project. I have one frame in which user can drop the
I am doing a project in java swing in which I have to use
I am doing a project in Java Swing. I have a JDialog which contains
I have a calculator application in java swing, which is working properly with mouse
I have an existing Java project in Netbeans that uses Swing and I would
I have been working on Java Swing project. Its design is pretty poor. I
I have a college project based on java swing. I wanted to use windowbuilder
For my Swing project, I need to support both Java 5 and Java 6
I have various Java Swing applications that are used by multiple users. My deployment
I have a Java Swing application that is being used as a cluster application.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.