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 3272294
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:48:40+00:00 2026-05-17T18:48:40+00:00

I’m trying some GUI development in Java and when I added the following code,

  • 0

I’m trying some GUI development in Java and when I added the following code, I got a runtime error during initialization of the class:

public class Search_Album_Main_Tab extends JPanel{
    JComboBox   search_list;
    JTextArea   searched_data;
    JButton     search_button;
    Results_Main_Tab rmt;
    Search_Action_Listener listener;

    public Search_Album_Main_Tab(Results_Main_Tab results_main_tab)
    {
        String[] search_options = {"Album", "Artist", "Genre", "ID", "Year"};
        setLayout(new GridLayout(3,1));
        rmt = results_main_tab;
        listener = new Search_Action_Listener();

        /*  Searched data   */
        searched_data = new JTextArea();

        /*  Search button   */
        search_button = new JButton("Search Album");
        search_button.addActionListener(listener);

        /*  Drop down menu  */
        search_list = new JComboBox(search_options);

        add(search_list);
        add(searched_data);
        add(search_button);     
    }

    private class Search_Action_Listener implements ActionListener
    {

        public void actionPerformed(ActionEvent event) 
        {
            if (event.getSource() == search_button)
            {

            }

        }

    }

}

The error I get is:

dcm_gui.GUI at localhost:53806  
    Thread [main] (Suspended (exception NullPointerException))  
        CUIAquaComboBox.applySizeFor(JComponent, CoreUIConstants$Size) line: 454    
        CUIAquaUtilControlSize.applyUISizing(JComponent, CoreUIConstants$Size) line: 99 
        CUIAquaUtilControlSize.access$200(JComponent, CoreUIConstants$Size) line: 13    
        CUIAquaUtilControlSize$PropertySizeListener.applyComponentSize(JComponent, Object) line: 121    
        CUIAquaUtilControlSize.addSizePropertyListener(JComponent) line: 25 
        CUIAquaComboBox.installListeners() line: 47 
        CUIAquaComboBox(BasicComboBoxUI).installUI(JComponent) line: 229    
        CUIAquaComboBox.installUI(JComponent) line: 30  
        JComboBox(JComponent).setUI(ComponentUI) line: 653  
        JComboBox.setUI(ComboBoxUI) line: 238   
        JComboBox.updateUI() line: 247  
        JComboBox.init() line: 212  
        JComboBox.<init>(Object[]) line: 178    
        Search_Album_Main_Tab.<init>(Results_Main_Tab) line: 36 
        GUI.main(String[]) line: 28 
    Daemon Thread [AWT-AppKit] (Running)    
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java (Oct 10, 2010 11:55:27 PM) 

Does anyone has any idea why?

Binyamin

  • 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-17T18:48:41+00:00Added an answer on May 17, 2026 at 6:48 pm

    This looks like an issue with your custom look and feel. I encountered a similar problem once before, when using custom looks and feels. It is described here:

    https://bugs.java.com/bugdatabase/view_bug?bug_id=4711700

    That was for the JFileChooser widget, not a combo box, but it might be related.

    The first thing you should try is reverting to the default "metal" look and feel. If that works, then it might be a problem with that specific L&F. I haven’t used the CUIAqua L&F before, but I think it’s the official Apple Java L&F. You might also like to try switching it out for QuaQua. It’s an alternative Mac-like L&F, which might (depending on the actual bug) avoid the problem.

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

Sidebar

Related Questions

I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am doing a simple coin flipping experiment for class that involves flipping a
I am trying to render a haml file in a javascript response like so:

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.