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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:33:18+00:00 2026-05-17T15:33:18+00:00

I have 3 ArrayList s and a JTable . I would like to be

  • 0

I have 3 ArrayLists and a JTable.
I would like to be able to add/edit/remove elements from the selected (from one of the 3) ArrayList by selecting the elements in the JTable and for example clicking on a button.

I have this code for using only one ArrayList:

/* ... */
EventList<MyClass> eventList = GlazedLists.eventList(myFirstArrayList);
SortedList<MyClass> sortedList = new SortedList<MyClass>(eventList, null);
filterList = new FilterList<MyClass>(sortedList);
EventTableModel<MyClass> listModel = new EventTableModel<MyClass>(filterList,
        myTableFormat);
table.setModel(listModel);
TableComparatorChooser.install(table, sortedList,
        AbstractTableComparatorChooser.MULTIPLE_COLUMN_MOUSE);
selectionModel = new EventSelectionModel<MyClass>(filterList);
table.setSelectionModel(selectionModel);
/* ... */

How could I change the source of the EventList or the FilterList to the 2. or the 3. ArrayList so if I edit the EventList it will modify the source ArrayList too?

  • 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-17T15:33:18+00:00Added an answer on May 17, 2026 at 3:33 pm

    As far as I know, Glazed Lists will not handle propagating changes in your event lists back to your underlying ArrayLists. In fact, in your example your event list and array list are not linked in any way — the event list just contains all the same items as the array list. See the javadoc for the GlazedLists.eventList static helper here

    What you probably want to do is install a listener on your event list and propagate any changes to your array list. Also make sure that you manipulate the event list in response to GUI deletion events. If you modify the filter list the events won’t propagate backwards to the event list.

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

Sidebar

Related Questions

I have a ArrayList made up of different elements imported from a db, made
I have an ArrayList<String> , and I want to remove repeated strings from it.
I have an ArrayList<String> that I'd like to return a copy of. ArrayList has
I need to make an ArrayList of ArrayLists thread safe. I also cannot have
I have 2 windows one window shown the JTable Model data, when double click
I have an arraylist that contains items called Room. Each Room has a roomtype
I have some data stored as ArrayList . And when I want to backup
In Java, say you have a class that wraps an ArrayList (or any collection)
Closed as exact duplicate of this question . I have an array/list of elements.
I have an ArrayList of Track objects. Each Track object has the following fields

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.