Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get data in MySQL table into Java JTable?

I'm working on Java project, and I need to load a particular set of data in to JTable. Can someone explain to me how to do this? These are my fields in the "mrnform" table in database called "order_processing".

`Date` varchar(10) NOT NULL,
`RegNo` int(11) NOT NULL,
`Description` varchar(50) NOT NULL,
`ItemNo` int(11) NOT NULL,
`Unit` varchar(10) NOT NULL,
`Quantity` int(11) NOT NULL,
`Delivery_Date` varchar(10) NOT NULL,
`Delivery_Address` varchar(10) NOT NULL,
`Site_Name` varchar(30) NOT NULL,
like image 727
SL_User Avatar asked Dec 16 '22 08:12

SL_User


1 Answers

1) construct JDBC Connection for MySql, examples here

2) load data to the JTable by using TableModel, examples here

3) if you'll reall question, post this question here in sscce from

like image 176
mKorbel Avatar answered Dec 26 '22 23:12

mKorbel