File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes TableSorter for TableModel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "TableSorter for TableModel" Watch "TableSorter for TableModel" New topic
Author

TableSorter for TableModel

K Madan
Greenhorn

Joined: Apr 08, 2004
Posts: 10
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

Joined: Nov 22, 2008
Posts: 18944
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

Joined: Feb 05, 2001
Posts: 17260
    
    6

"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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11526
    
100

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


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
K Madan
Greenhorn

Joined: Apr 08, 2004
Posts: 10
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

Joined: Nov 22, 2008
Posts: 18944
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

Joined: Apr 08, 2004
Posts: 10
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

Joined: Mar 28, 2003
Posts: 11526
    
100

Hi K,
Yes, your name does conform. Thank you.
Regards, Andrew
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: TableSorter for TableModel