+8  A: 

You would use a JTable to implement it. Your data will be stored in a TableModel. The DefaultTableCellRenderer and DefaultTableCellEditor should do what you need, but you can also customize the rendering/behavior if necessary.

More info on renderers/editors: http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#editrender

rob
Thanks. The link in your post is perfect for what I'm trying to do.
ShaChris23
+2  A: 
OscarRyz
A: 

JTable will do this for you, you're going to need to understand the MVC pattern pretty well to acheive this as you will need a custom model and renderer, but once you get the hang of it its not too hard.

David gearys book "Graphic Java Vol.2" has an excellent section on JTable, whilst this book is now fairly old I still personally think thats the best explanation of JTable I've seen.

krystan honour