Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TableSorter for TableModel

 
K Madan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
are we allowed to use the code of TableSorter as is in the SCJD assignment?
Please advice. TableSorter comes as part of the swing tutorial ... :roll:
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorting is not a requirement AFAIK.
So, if you still want to implement it, I would advise not to use the Swing example - this is lame. It is not a good example anyway. If you don't know how to implement one from scratch look for one of the other several hundred samples that must be out there.
Regards,
Marcel
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"kmadan"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it
here.
Thanks! and welcome to the JavaRanch!
Mark
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11944
212
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kmadan,
Welcome to JavaRanch.
Do you have a statment in your instructions telling you that "you must not submit any code that is not your own work"? If so, then it would be extremely risky to use a class that you did not write.
You could use the ideas presented in the tutorial to create your own sorter (and probably do a better job of it while you are at it).
Remember that the tutorials are usually designed to get a generic concept across - they can usually be made more maintainable / more efficient when you have a specific goal in mind (which is why Microsoft were able to make a better :roll: "Pet Store" application - they just removed all the design patterns that the Pet Store was designed to showcase ).
Regards, Andrew
 
K Madan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys for pointing me in correct direction, not to use others work, I will write own sorter.
Its not a requirement but makes the GUI work better.
thanks for the help
KMadan
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Mark said, please ajust your displayed name.
If you want to write your own sorter java.util.Collections.sort(List list, Comparator c) might of use for you
Regards,
Marcel
 
K Madan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think my diaplayed name conforms with the naming policy . . .
"You can even use initials for the first name if you like. "
:roll:
cheers
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11944
212
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi K,
Yes, your name does conform. Thank you.
Regards, Andrew
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic