This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes how to sort items in java.awt.List Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to sort items in java.awt.List" Watch "how to sort items in java.awt.List" New topic
Author

how to sort items in java.awt.List

Ramu Rondla
Greenhorn

Joined: Oct 04, 2003
Posts: 9
Hello friends,
I am a beginner in java. I am trying my hand at AWT. I am wondering is there anyway to sort items in a List. (not java.util.List)
Thanks
Ramu
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8705
    
    6

You can get the list of objects as an array of String objects with List.getItems() and you can sort arrays using java.util.Arrays.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
 
subject: how to sort items in java.awt.List
 
Similar Threads
How to sort Map
Manipulating Array Data
Split String to ArrayList
Change & sort the contents of JComboBox in Swing
Displaying prices