Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to sort jTree Nodes

843804Oct 27 2004 — edited May 27 2009
Hi,
I am interested in whats the easiest way to sort jTree Nodes alphabetically. Is there any Method to do this directly or may i use something like quicksort?
Thanks for help
Mirco

Comments

user9540031
Answer

A quick look into the Globalization Support Guide, sections 5.9.1 Character Range '[x-y]' in Regular Expressions, and 5.5.2 Specifying a Case-Insensitive or Accent-Insensitive Collation, suggests that this is expected behaviour: a < A < b < B (etc.) is true in the GERMAN collating sequence (if I understand well). The reason why there is no match with 'aaaa' is because 'a' is not in the [A-Z] range, whereas 'b' is, when NLS_SORT = 'GERMAN'.
So in this case it would seem that 19.5 gives the right result, whereas 12.1 did not.

Marked as Answer by User_RVFU1 · Dec 18 2020
1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 24 2009
Added on Oct 27 2004
9 comments
4,824 views