Hi, i am beginner in java. I doing my final year project in Java Swing. So far, somehow through some online tutorials and articles, i learned to finish 30$ of my project. Now, i need to know how to insert the data from my database into Jtable and display it.... This is my project output message actually. So, please i need help to finish off my project successfully.

For last three days, i went through lot of tutorials and articles but none can help in guiding to insert data (which is returned from database and saved in ResultSet obj) into Jtable and run it.

I am struck pretty much in beginning itself. I am using Netbeans 7.1

1) I dragged Jtable and dropped in the jframe.
2) I clicked table contents
3) Then selected bound options
4) Then clicked on "Import data to form"

After clicking, the import progress keeps on going for hours (at present the database is empty since only when project is running, data are fed to database to show).

I am doing the step wrongly?
Is their any other way to insert data queried from mysql database in Jtable? may be any function?

Thanks,

Vishnu Kumar

what you are doing has nothing to do with actual programming, you're just trying to do everything without the programming, which is why you don't have any control over it, and why you don't know if somethings going wrong, and, if so, what.

try hardcoding the setting of values in your JTable
if that works, write a method that accepts an arraylist with data you want written in it and that fills the JTable with that, test it.
if that works, take a loot at this and learn to use your MySQL DB in java, test that, and once you have all that to work, combine it, you'll be amazed how well it can work.

I can't force you to do any of the above, but if you are too lazy to do anything but using a wysiwyg editor, you can consider us too lazy to help you out checking what's wrong.

not only did you provide any code, you basically told us how you expected to create an entire and working application with some mouseclicks in under ten minutes. seriously, if it was that simple, do you really think our employers would pay us thousands and thousands a year for such applications?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.