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

  • Home
  • SEARCH
  • 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 7618919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:31:46+00:00 2026-05-31T03:31:46+00:00

Hi I am creating a program and I encountered an error when running it.

  • 0

Hi I am creating a program and I encountered an error when running it. It says:

    Exception in thread "main" java.lang.NullPointerException
            at java.awt.Container.addImpl(Container.java:1045)
            at java.awt.Container.add(Container.java:365)
            at javax.swing.JPopupMenu.add(JPopupMenu.java:264)
            at javax.swing.JMenu.add(JMenu.java:562)
            at truthtable.GUI.getCreatedMenuBar(GUI.java:587)
            at truthtable.GUI.<init>(GUI.java:208)
            at truthtable.Application.<init>(Application.java:10)
            at truthtable.Application.main(Application.java:18)
    Java Result: 1

My class Application.java:

  package truthtable;
    public class Application {

        public Application() {
            new GUI(null);
        }

        public static void main(final String[] args) {
            new Application();
        }
    }

What does this mean? And when i tried to edit the code in that error, it is readonly.

This is my code for gui constructor :

 public GUI(final ApplicationStarter appStarter) {
        super();

        this.applicationStarter = appStarter;
        outputMode = TruthValue.TRUE_FALSE;
        computationMethod = COMPLETE_METHOD;
        hasFullPermission = getHasFullPermission();
        smallTableLimit = 256;
        maxStatementLength = 256;
        maxRowsInTextTable = 1024;

      int arraySize=3;

        buttonStates = new boolean[4];
        final GridBagConstraints gbc = new GridBagConstraints();
        defaultCursor = new Cursor(Cursor.DEFAULT_CURSOR);
        waitCursor = new Cursor(Cursor.WAIT_CURSOR);

        setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
        addComponentListener(new ComponentAdapter() {
            public void componentResized(final ComponentEvent e) {
                int width = getWidth(),
                    height = getHeight();

                final int minHeight=50;
                final int minWidth=20;
                if (width < minWidth)
                    width = minWidth;
                if (height < minHeight)
                    height = minHeight;
                setSize(width, height);
            }
  • 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-05-31T03:31:47+00:00Added an answer on May 31, 2026 at 3:31 am

    I believe you are running the wrong program. You need a GUI constructor to go with it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While creating a java program i encountered a problem, A subclass constructor is throwing
I am creating a program to copy a text file. I have a main.cpp
I am creating a program that will download a .jar (java) file from a
I creating a program which send newsletter with a background image. It works fine
I am creating a program that will be installed using the .net installer project.
I am creating a program that needs to store the user's data in encrypted
I am creating a program that displays a popup at certain times (just like
I'm creating a program that authenticates from a before it runs. I also want
I am creating a program which has an installer-like interface. Is it better to
I'm creating a program using C# (in ASP.NET environment) that makes an XML file.

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.