0

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?

2

3 Answers 3

3

Check out this tutorial: How to Use Tables

Sign up to request clarification or add additional context in comments.

Comments

2

Seems your question is similar with these two questions:

How to fill data in a JTable with database?

Displaying data from database in JTable

Comments

0

Check out GlazedLists it comes with ready made TableModels that are based on modern collection interfaces.

http://www.glazedlists.com/

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.