Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTable Sorting

 
Sham Delaney
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am considering implementing JTable sorting.
My JTable uses my own TableModel that extends AbstractTableModel.
I have found no easy way of doing this. I did find a TableSorter class that is shipped with the JDK (demo\jfc\TableExample). But this seems a little complicated.

I am not sure if i can use this in my project as it is not my code...but it is shipped with the JDK. So would it be ok to use it in my project?

Can anyone help me with this?

Or if anyone has any other ideas on a simpler way to do this I would be greatful.
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the demos are not part of the standard library so you can't use them (except as inspiration of course).
 
Sham Delaney
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you think about implemnting this sort? Do you think it goes beyond the scope of the project? Have you implemented a sort on your Table?
 
Bob Nedwor
hangman
Ranch Hand
Posts: 215
Eclipse IDE Oracle Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did not implement sorting on mine (B&S). I considered this to be outside the scope of the project. I hope this helps.
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
same here. I thought about it but didn't implement it.
Having the ability to filter your results using the search options is far more important.

And read your assignment carefully there. Mine has conflicting filtering requirements for client and server!
 
Bob Nedwor
hangman
Ranch Hand
Posts: 215
Eclipse IDE Oracle Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I agree. I did not even use my server method "FindbyCriteria". It made no sense for what the gui wanted.
 
Manuel Comnenus
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeroen,

Could you share your approach for situations when you had conflicting instructions? How did you make your final decisions in these cases.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Manuel Comnenus:
Hi Jeroen,

Could you share your approach for situations when you had conflicting instructions? How did you make your final decisions in these cases.
Hi Manuel,

Rather than hijacking this topic, may I suggest that you start your own thread to talk about conflicts in the instructions?

You could probably start by identifying which conflicts you have already noted, along with your thoughts on how you plan to address them. Other people might then join in with other conflicts and/or other resolutions.

Regards, Andrew
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've stated elsewhere how I went about solving that.
Short: I implemented both requirements.
 
Ken Boyd
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not implementing it either as spec doesn't say anything about sorting. I will mention in choice.txt
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic