Look at the tutorial: How to Use Tables (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)