I know how to retrieve data (just text in a table) from a database in Java and how to show it in the console. But I want to load it in a JTable. Is there a good (modern) way (tutorial), without using Vectors?
Asked
Active
Viewed 4,208 times
0
-
2Please research your topic before asking a question; there are many tutorials out there which can be found with a simple Google search. – Dennis Jan 06 '12 at 04:18
-
duplicated at http://stackoverflow.com/questions/8774481/filling-object-data/8774505 and http://stackoverflow.com/questions/8775076/jtablejdbc-easiest-way – alf Jan 08 '12 at 11:05
3 Answers
2
Seems your question is similar with these two questions:

Community
- 1
- 1

Haoming Zhang
- 2,672
- 2
- 28
- 32
0
Check out GlazedLists it comes with ready made TableModels that are based on modern collection interfaces.
If you don't want to use an extra library. You can easily implement your own javax.swing.table.TableModel. I like to implement TableModel and java.util.List so I'm working with just a simple List, and hooking up any List easily.

chubbsondubs
- 37,646
- 24
- 106
- 138