I am new to java programming and i have been struggling to connect my Jtextfields to my java database.

I have been working with Delphi previously and was wondering how i can connect the GUI fields in my form to an already existing database using jdbc.

Any help appreciated.

Thanks

Would you mind explaining what exactly you after so you can get more accurate advice?

I used to use Delphi too back when it was in version 5 / 6. Refresh my memory but with Delphi you could create a datasource element (or how many you'd need) in your project and assign specific datasource fields (table columns) to specific text boxes (GUI element). Once linked the text boxes would display the data of the current record of their linked column, also any changes would be updated to the current record in the DB (depending on how it was set up of course).

Is this what you want to mimic in Java?

Hi,

That is what i would want to mimic in java if possible. But whichever way, i want to populate my Jtextfields with data from the table.

Thanks

Would you mind explaining what exactly you after so you can get more accurate advice?

This is the situation.

I have created some GUI forms (Data entry for Payroll) using Swing components in Netbeans 6.8. I want to tie each Jtextfield to a field in my employee table.

As mentioned earlier in Delphi, i could do this through a datasource, but i have been struggling to get it working in java.

Regards

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.