QUOTE(wutske @ Nov 5 2007, 09:20 AM)

@ethergeek: I know vectors are more dynamic then arrays, but are there any other advantagen when using them ?
Lots.

- They're thread safe
- They're easier to work with
- Parameterized, there's no casting needed like there was in 1.4-
- Serialize easier
- Implement most of the collections interfaces, so you get sorting, iterating, serialization...right out of the box
- Built in batch methods for adding collections to collections
Object oriented collections almost always have an advantage over simple collections like arrays. The notable exception here is arrays of primitives...you can't make collections of primitives, so the JVM has to autobox/unbox them when you try...this can be slow if done in a large loop.
Edit: I forgot to mention: when updating a GUI on the fly, it's a good idea to pass it off to the Event Dispatch Thread (EDT) so as to avoid painting inconsistencies. This is easily done using the SwingUtilities.invokeAndWait() method.
Comment/Reply (w/o sign-up)