• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

JTable Sorting  RSS feed

 
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.
 
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?
 
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.
 
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.
 
author and jackaroo
Marshal Commander
Posts: 12218
279
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.
 
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!