Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • 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:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

JTable Sorting

 
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
Posts: 220
Angular Framework Ubuntu Java
  • 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
Posts: 220
Angular Framework Ubuntu Java
  • 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
Posts: 12199
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • 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
 
Can you shoot lasers out of your eyes? Don't look at this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic