Sorting an array by date/time
Posted on 2004-07-31
I'm fairly new to Java, so I'll try and explain what I need properly.
I've got a frame, which reads a text containing log entries. However, the log entries will not be in any kind of order, but when I display them, I'd like them to be in date/time order.
An example entry would be:-
15/07/2004-09:00-Another log entry.
So, how can I display those entries (note the log file could contain an infinate number of entries) in a list box in my frame? You may need to supply all of the code for the frame/file reading bit - although I can do it myself, it could cause problems inserting code into the mess I've already created!
Finally, this will be inside another program, so I already have a main function. The screen will be called from other methods in other java files.
Hope I've explained it properly. If not, just let me know.