Copyright (c) SEMM NL All rights reserved.
Author : Paul Hamaker. Part of JavaLessons.com
Important stuff. Add ID, last name, first name, fee, entered by the user, to the MEMBERS table.
If you want to use the same statement repeatedly, but with different parameters, java.sql.PreparedStatement is the way to go.
We have java.sql.Connection create an instance initially.
And fill the parameters ....
with data entered by the user each time that actionPerformed is called.
A regular applet is considered untrusted and can only connect to a database on the host that it came from. If an applet has to connect to a different remote database, one solution is, to put it in a signed jar file. See the Security Lessons for that.
This shows a different technique to load a class. If it's found, it's loaded, an instance is made and its no-parameters constructor is executed. This driver then registers itself with DriverManager, as you saw in the previous lesson. Not all drivers do this, however ! This code will NOT alert you through a compile-time error, if the class isn't found.
There should be checks on : empty field, not numeric etc...
Integer.parseInt : make an int based on a String.