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 Is there a need to sort columns by clicking on headers? 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 "Is there a need to sort columns by clicking on headers?" Watch "Is there a need to sort columns by clicking on headers?" New topic
Author

Is there a need to sort columns by clicking on headers?

Ed Tse
Ranch Hand

Joined: Sep 18, 2003
Posts: 183
I see that a lot of people didn't score perfect on GUI, would adding sort columns by clicking on headers earn me more points? I find this to be a very common practice on most tables.


SCJP, Pre-SCJD (URLyBird 1.3.1), Teradata Cert'd Prof
Yupp Cook
Ranch Hand

Joined: Feb 07, 2006
Posts: 49
Couln't see anything like this in my spec(BS_2.1.2).
My records appear always in the order of recNo.
I think you don't get credit implementing a sorting mechanism.

Y.


SCJP 1.4<br />SCJD (BS2.1.2)
Jason Moors
Ranch Hand

Joined: Dec 04, 2001
Posts: 188
Not sure if it will get you more marks? My approach so far has to keep it simple and only implement the requirements.

I think it's probably worth spending the time making sure that you've satisfied the UI requirements and have created a framework that will support future enhancement to the GUI.

Saying that I think there is possible justification for providing the functionality, as Row Sorting is mentioned in the Java Look and Feel Guidelines.

Java Look and Feel Guidelines

I guess if you think it's not much effort and you can implement in a way that your not going to lose mark then do it.

Jason.
[ March 26, 2006: Message edited by: Jason Moors ]
Kristof Janssens
Greenhorn

Joined: Jan 05, 2005
Posts: 23
I've added it in my application, still waiting for the score so I can't tell you my GUI score.
But I can tell you it's quite simple to implement. The only problem is the arrow symbol that shows in which order the table is sorted. You can paint it yourself (with awt)or use an external image or you can keep it really simple like me:
add \/ or /\ depending on the sorting order.
I'm quit happy with it and it was really easy to make.
[ March 29, 2006: Message edited by: Kristof Janssens ]

SCJP 1.4 (90%)<br />SCJD (in progress)
Ed Tse
Ranch Hand

Joined: Sep 18, 2003
Posts: 183
Yes, I found that it's not hard to implement, however I don't have the triangle indicators.
Kristof Janssens
Greenhorn

Joined: Jan 05, 2005
Posts: 23
well, you can do it like I said I did it:
use slashes ( \/ and /\ )

It isn't the best solution but it's clean, easy and you see that something happened.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is there a need to sort columns by clicking on headers?