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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:26:08+00:00 2026-06-15T11:26:08+00:00

I am trying to perform an action whenever a selected item on the combobox

  • 0

I am trying to perform an action whenever a selected item on the combobox changes. one particular scenario, when action listener is not notified, is when you reset the model on the combobox. I can subscribe with another PropertyChangedListener and listen when the model changes, and then extract selected item, but I simply do not understand why the selected item changed event is not raise dwhen model changes. visually your selection does change, even if you query the cobox for a selected item, it does change from null to some object… ANy clear olution to this, rather than using two separate listeners?

  • 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-15T11:26:09+00:00Added an answer on June 15, 2026 at 11:26 am

    If the action and item listeners don’t fire events when model is reset, you can fire those event by yourself by subclassing JComboBox:

    public class MyComboBox extends JComboBox 
    {
        @Override
        public void setModel(ComboBoxModel aModel) {
            super.setModel(aModel);
            fireActionEvent();
        }
    }
    

    But IMHO it is a bug – you should report that to the official bugzilla.

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

Sidebar

Related Questions

I'm trying to get java to perform one action after one click and then
hi all i'm trying to perform an action once the user double clicks on
I'm trying to get my application to perform an action after a delay, but
I am trying to click a table row and perform an action. However if
I am trying to perform UPDATE action in Gridview(ASP.net). I have created a AccessDataSource
I am trying to loop through all files and folders and perform an action
I've been struggling with trying to get my commandButtons to perform an action (yet
I'm trying to perform a group by action on an aliased column (example below)
I am trying to make my page perform an action only if it sees
I am trying to create an automation to perform some action to a HTML

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.