• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JTable Sorting

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 220
Angular Framework Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 220
Angular Framework Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic