//JDBC using Applet
/*
*/
import javax.swing.*; //JApplet,JLabel,JButton
import java.applet.*; //
You won't be able to run JDBC in an applet without taking steps to give the applet appropriate permissions. The topic is covered in detail by this tutorial from Oracle.
You wont be able to access ODBC drivers from an (untrusted) applet, same as you wont be able to read the local file system.
There are "pure Java" JDBC drivers which only need socket permissions. This will work if the database server is available through the same origin ("Same Origin Policy") as the web server that delivered the applet (and there's nothing interfering on the network).
However, it's probably a bad idea to expose a database over the network to end users. Usually you would expose a safe interface through a web server. Also if the applet is loaded over a network, it's unlikely that you'd want to pick up a locally configured database.
(The code in the question seems extraordinary long compared to a minimum complete program that expresses the problem, but I could go on for ever criticising code.)