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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:52:50+00:00 2026-06-17T20:52:50+00:00

I have coded this Listener: playlistTable.addMouseListener(new MouseAdapter() { private boolean ignoreDoubleClicks = false; public

  • 0

I have coded this Listener:

        playlistTable.addMouseListener(new MouseAdapter() {

        private boolean ignoreDoubleClicks = false;

        public void mouseClicked(MouseEvent e) {
            if (e.getClickCount() == 2 && !ignoreDoubleClicks) {
                this.ignoreDoubleClicks  = true;
                System.out.println(ignoreDoubleClicks);
                JTable target = (JTable)e.getSource();
                int row = target.getSelectedRow();

                videoTableModel = new VideoTableModel(playlistService.getMoviesOfPlaylist(row));
                target.setModel(videoTableModel);
                //TODO enables the table
                //movieTable.setEnabled(false);

                createPlaylist.setEnabled(false);
                setButtonIcon("icons\\playlist_grau.png", createPlaylist, "createPlaylist");

                removePlaylist.setEnabled(false);
                setButtonIcon("icons\\bin_grau.png", removePlaylist, "removePlaylist");

                algoButton.setEnabled(false);
                setButtonIcon("icons\\glyphicons_137_cogwheels_grau.png", algoButton, "algoButton");

                //                  playlistTable.setEnabled(false);

                revalidate();
            }
        }
    });

However, when I FIRST double click the playlist I get the movies. When I go back with another button and double click AGAIN on the playlisttable, it is not clickable anymore. Why?

UPDATE

The problem is this.ignoreDoubleClicks = true;
However, why it is not set to false?

  • 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-17T20:52:51+00:00Added an answer on June 17, 2026 at 8:52 pm

    On the first double click mouse event, you set this.ignoreDoubleClicks = true and I do not see any code that would reset it back to false. As all code seems wrapped into if statement that checks if !this.ignoreDoubleClicks, setting it to true locks the listener permanently. The left side of the condition (e.getClickCount() == 2) may or may not evaluate to true, does not matter anyway as the right side is false and the operator is the logical and (&&).

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

Sidebar

Related Questions

I have something like this hard-coded: private string[,] m_RolesForUser = new string[,] { {John,President,Chair},
I have some html5 postMessage code: window.addEventListener(message, FA.recieveMessage, false); That listener invokes this function:
I have this piece of code: public static DateDialogFragment newInstance(Context context, DateDialogFragmentListener listener) {
i have code like this. this is on create public void onCreate(Bundle savedInstanceState) {
I have this code: public class VoiceActivity extends Activity implements OnClickListener { private TextView
I have this code: @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws
I have this code here ToggleButton toggleAlarm = (ToggleButton) d.findViewById(R.id.toggle_alarm); toggleAlarm.setOnCheckedChangeListener(new OnCheckedChangeListener() { public
I have a code: private void submitExec() { if (SQLiteDbWrapper.getInstance().getBookCount()==0) { Toast.makeText(this, A list
I have an NSIS installer that has the start menu folders hard-coded using this
So I was have a combobox like below, coded like this; AllowsTransparency=True Background=Transparent> <Border

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.