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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:04:46+00:00 2026-05-27T08:04:46+00:00

I am reading following data – Year, No, Name, 2009, 1, ABC 2009, 2,

  • 0

I am reading following data –

Year, No, Name, 
2009, 1, ABC
2009, 2, PQR
2009, 3, XYZ
2010, 1, BCD
2010, 2, DEF
2010, 3, JKL
2011, 1, FGH
2011, 2, IJK
2011, 3, LMN

Its a sample, there are thousands of these type.
I need to display the unique Year value in JList and for the selected Year, I have to give a CheckBox, which if selected, would display the Name sorted on No, otherwise sorted on Name.

  • 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-27T08:04:47+00:00Added an answer on May 27, 2026 at 8:04 am

    What you need looks like a Map, key will be the Year, and value will be a list of No and Number (you need to create your own class).

    Then you need to create two Comparator, one is based on Name, the other is No. So when checkbox is checked, you use Name-based comparator to sort the list, when unchecked, use No-based comparator to sort the list.

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

Sidebar

Related Questions

I'm reading from a binary data file which is written by invoking the following
Having a project with following requirements in mind. data reading intensive application. 100 max
I am reading data from a text file with following properties: Encoding: ANSI File
I am reading the following article, http://articles.sitepoint.com/article/hierarchical-data-database/2 aboutStoring Hierarchical Data in a Database. This
I am reading data structures in C and C++ by Tannenbaum. Following is text
Does reading XML data like in the following code create the DOM tree in
Im reading from a file (data.bin) using the following approach - fis1 = new
Check this example before reading the question - http://www.sqlfiddle.com/#!2/fcf3e/8 The following data comes from
Reading the data the following way data<-read.csv(userStats.csv, sep=,, header=F) I tried to select an
I am reading in log data with the following time stamp format: Sat Aug

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.