Skip to main content

What is the best way to creat a leaderboard?

2 replies [Last post]
dvtieu74
Offline
Joined: 2010-09-27

Does any one have any better ideas to help create my personal leaderboard project?

This is what I'm look to achieve: a badminton leader board, set up like this:
Name Points Won Lost
Person1 10 5 0
Person2 5 3 2
Person3 1 1 4
etc etc etc..

I need to be able to sort this leader board so that I can who has the most points.
But I want to be able to do this with the won column and lost column too. So for instance I click on the Won column and the list is sorted to show most at the top descending down.

I've tried this with an array list. But I can only get it to sort out one column ie (points).

So is there a way of doing this or if you think there is a better approach, please let me know. Bear in mind i'm still only a begginer! Thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
walterln
Offline
Joined: 2007-04-17

Search for "java swing JTable tutorial".

dvtieu74
Offline
Joined: 2010-09-27

Thanks I'll give it a go