I want to create a frame in java with variable number of checkboxes which will depend on the number of rows present in my database.
Problems that I am facing are:-
1. How to count the number of rows in database?
2. How and where to store the data present in columns of database?
3. How to create checkboxes with that data present in column of database?
Can anyone help me.??
Looking forward for solution.
Thanks in advance 🙂
SELECT COUNT(*) FROM table_name;
I would suggest you to use JTable and look the tutorial How to use Table
Read about Renderer and Editor section to know more about registered cell renderers in
JTable.