respuesta de JCombobox con conexion a mysql desde Netbeans

hola soy yo simon carnales este cuate si sabe gracias compa ahora este es el codigo
completo le aumente otras cosas pero ahi esta completido esta en NetBeans 6.5 y mysql5
con el conector 3.0.5 vaa le paso la tabla espero y le sirva estoy haciendo mi tesis
de esto asi que sim pueden hayudarme lo hare codigo abierto va......

(osr_santin@hotmail.com, omsantiago.777@gmail.com)

package omarsito;
import java.sql.*;
import javax.swing.JOptionPane;
//import java.sql.Update;
/**
*
* @author Omar
*/
public class combos extends javax.swing.JFrame {

private String url = "jdbc:mysql://localhost:3306/fecha";
private String user = "root";
private String password = "santiago";
Connection conexion = null;
Statement consulta = null;
ResultSet resultado = null;
private String dia;
private String mes;
private String anio;
private String sexo;
private String estado;
int hola;
/* private String jnom;
private String jape;
private String jtel;
private String jmail;
private String calle;
private String jcomu;
private String jmun;*/
//private modelo modelo = null;
/** Creates new form combos */
public combos() {
// modelo = new modelo();
initComponents();
try{
System.out.println("Cargando Driver...");
Class.forName("com.mysql.jdbc.Driver");
System.out.println("Exito Cargando Driver...");
}catch(Exception e){
System.out.println("Error conexion():" + e);
}

}

/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
//
private void initComponents() {

buttonGroup1 = new javax.swing.ButtonGroup();
jPanel1 = new javax.swing.JPanel();
jDia = new javax.swing.JComboBox();
jMes = new javax.swing.JComboBox();
jAnio = new javax.swing.JComboBox();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
cmdGuardar = new javax.swing.JButton();
cmdCancelar = new javax.swing.JButton();
jSexo = new javax.swing.JComboBox();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jEdo = new javax.swing.JComboBox();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
jLabel12 = new javax.swing.JLabel();
jLabel13 = new javax.swing.JLabel();
jcalle = new javax.swing.JTextField();
jLabel14 = new javax.swing.JLabel();
jcomu = new javax.swing.JTextField();
jLabel15 = new javax.swing.JLabel();
jmuni = new javax.swing.JTextField();
jnom = new javax.swing.JTextField();
jape = new javax.swing.JTextField();
jtel = new javax.swing.JTextField();
jmail = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jboton = new javax.swing.JRadioButton();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Base de datos com JCombo");
setResizable(false);

jPanel1.setBackground(new java.awt.Color(0, 153, 153));

jDia.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" }));
jDia.setName("dia"); // NOI18N

jMes.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre" }));
jMes.setName("mes"); // NOI18N

jAnio.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000" }));
jAnio.setName("anio"); // NOI18N

jLabel1.setText("Ingresar datos correspondientes");

jLabel2.setText("Dia:");

jLabel3.setText("Mes:");

jLabel4.setText("Año:");

cmdGuardar.setText("Guardar");
cmdGuardar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdGuardarActionPerformed(evt);
}
});

cmdCancelar.setText("Cancelar");
cmdCancelar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdCancelarActionPerformed(evt);
}
});

jSexo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Femenino", "Masculino" }));

jLabel5.setText("Sexo:");

jLabel6.setText("Estado:");

jEdo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Mexico", "Michoacan", "Guadalajara", "Monterrey", "Puebla", "Guerrero", "Tlaxcala", "Campeche", "Didtrito Federal" }));

jLabel7.setText("Nombre:");

jLabel8.setText("Apellidos:");

jLabel9.setText("Telefono:");

jLabel10.setText("E-mail:");

jLabel11.setText("Fecha de nacimiento:");

jLabel12.setText("Domicilio:");

jLabel13.setText("Calle / Barrio");

jLabel14.setText("Colonia / Comunidad");

jLabel15.setText("Delegacion / Municipio");

jmail.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jmailActionPerformed(evt);
}
});

jButton1.setText("Salir");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

jboton.setText("hola");

org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.add(170, 170, 170)
.add(cmdGuardar)
.add(54, 54, 54)
.add(cmdCancelar)
.add(59, 59, 59)
.add(jButton1)
.add(101, 101, 101)
.add(jboton)
.addContainerGap(200, Short.MAX_VALUE))
.add(jPanel1Layout.createSequentialGroup()
.add(196, 196, 196)
.add(jLabel1)
.addContainerGap(475, Short.MAX_VALUE))
.add(jPanel1Layout.createSequentialGroup()
.addContainerGap(105, Short.MAX_VALUE)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(jLabel5)
.add(jLabel9)
.add(jLabel7))
.add(63, 63, 63)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
.add(org.jdesktop.layout.GroupLayout.LEADING, jtel)
.add(org.jdesktop.layout.GroupLayout.LEADING, jnom, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE))
.add(34, 34, 34)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(jLabel8)
.add(jLabel10))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(org.jdesktop.layout.GroupLayout.LEADING, jmail, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE)
.add(org.jdesktop.layout.GroupLayout.LEADING, jape, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE)
.add(org.jdesktop.layout.GroupLayout.LEADING, jPanel1Layout.createSequentialGroup()
.add(jLabel4)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 30, Short.MAX_VALUE)
.add(jAnio, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 130, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(196, 196, 196))
.add(jPanel1Layout.createSequentialGroup()
.add(jSexo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 169, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap())))
.add(jPanel1Layout.createSequentialGroup()
.add(95, 95, 95)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.add(jLabel2)
.add(18, 18, 18)
.add(jDia, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 101, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(18, 18, 18)
.add(jLabel3)
.add(18, 18, 18)
.add(jMes, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 132, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(jPanel1Layout.createSequentialGroup()
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(jLabel13)
.add(jLabel12))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(jcalle, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 103, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(18, 18, 18)
.add(jLabel14)
.add(18, 18, 18)
.add(jcomu, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 229, Short.MAX_VALUE)))
.addContainerGap(196, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(jPanel1Layout.createSequentialGroup()
.add(84, 84, 84)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.add(29, 29, 29)
.add(jLabel11))
.add(jPanel1Layout.createSequentialGroup()
.add(14, 14, 14)
.add(jLabel15)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jmuni, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 186, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(20, 20, 20)
.add(jLabel6)
.add(18, 18, 18)
.add(jEdo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 174, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(186, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.add(38, 38, 38)
.add(jLabel1)
.add(32, 32, 32)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jape, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jnom, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel7)
.add(jLabel8))
.add(18, 18, 18)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel9)
.add(jtel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel10)
.add(jmail, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(18, 18, 18)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel5)
.add(jSexo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(32, 32, 32)
.add(jLabel11)
.add(22, 22, 22)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel2)
.add(jDia, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel3)
.add(jMes, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jAnio, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel4))
.add(27, 27, 27)
.add(jLabel12)
.add(26, 26, 26)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel13)
.add(jcalle, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel14)
.add(jcomu, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(34, 34, 34)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel15)
.add(jmuni, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jLabel6)
.add(jEdo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 52, Short.MAX_VALUE)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(cmdGuardar)
.add(cmdCancelar)
.add(jButton1)
.add(jboton))
.add(27, 27, 27))
);

org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);

java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
setBounds((screenSize.width-728)/2, (screenSize.height-550)/2, 728, 550);
}//

private void cmdCancelarActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int i = JOptionPane.showConfirmDialog(this, "Quieres cancelar este registro", "Cancelar registro", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
if (i==0){
jnom.setText("");
jape.setText("");
jtel.setText("");
jmail.setText("");
jcalle.setText("");
jcomu.setText("");
jmuni.setText("");
}else{
//respuesta.setText("Has dicho que NO");
}

}

private void cmdGuardarActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
/*int i = JOptionPane.showConfirmDialog(this, "El registro se guardo deseas ingresar otro ?", "Registro guardado", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
if (i==0){
jnom.setText("");
jape.setText("");
jtel.setText("");
jmail.setText("");
jcalle.setText("");
jcomu.setText("");
jmuni.setText("");*/

String nom,ape,tel,mail,calle,comu,muni;
dia = jDia.getSelectedItem()!= null ? jDia.getSelectedItem().toString (): "" ;
mes = jMes.getSelectedItem()!= null ? jMes.getSelectedItem().toString (): "";
anio = jAnio.getSelectedItem()!= null ? jAnio.getSelectedItem().toString (): "";
sexo = jSexo.getSelectedItem()!= null ? jSexo.getSelectedItem().toString (): "";
estado = jEdo.getSelectedItem()!= null ? jEdo.getSelectedItem().toString (): "";

nom = jnom.getText();
ape = jape.getText();
tel = jtel.getText();
mail = jmail.getText();
calle = jcalle.getText();
comu = jcomu.getText();
muni = jmuni.getText();
//ingenieria=jIng.getSelectedI
try{

System.out.println("Abriendo Conexion a MYSQL...");
conexion = DriverManager.getConnection(url,user,password);
System.out.println("Exito Abriendo Conexion a MYSQL...");
PreparedStatement preparedStatement = conexion.prepareStatement("insert into fechas(nombre,apellidos,telefono,mail,sexo,dia,mes,anio,calle,comunidad,municipio,estado,fecha) values(?,?,?,?,?,?,?,?,?,?,?,?,NOW())");
preparedStatement.setString(1, nom);
preparedStatement.setString(2, ape);
preparedStatement.setString(3, tel);
preparedStatement.setString(4, mail);
preparedStatement.setString(5, sexo);
preparedStatement.setString(6, dia);
preparedStatement.setString(7, mes);
preparedStatement.setString(8, anio);
preparedStatement.setString(9, calle);
preparedStatement.setString(10, comu);
preparedStatement.setString(11, muni);
preparedStatement.setString(12, estado);
//preparedStatement.setString(6, fecha);
preparedStatement.executeUpdate();
}catch(Exception e){
System.out.println("Error conexion.addPerson():" + e);
}finally{
try {
conexion.close();
//preparedStatement.close();
} catch (SQLException ex) {}
}

/* }else
{
System.exit(0);
}*/
}

private void jmailActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
System.exit(0);
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new combos().setVisible(true);
}
});
}

// Variables declaration - do not modify
private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.JButton cmdCancelar;
private javax.swing.JButton cmdGuardar;
private javax.swing.JComboBox jAnio;
private javax.swing.JButton jButton1;
private javax.swing.JComboBox jDia;
private javax.swing.JComboBox jEdo;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel13;
private javax.swing.JLabel jLabel14;
private javax.swing.JLabel jLabel15;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JComboBox jMes;
private javax.swing.JPanel jPanel1;
private javax.swing.JComboBox jSexo;
private javax.swing.JTextField jape;
private javax.swing.JRadioButton jboton;
private javax.swing.JTextField jcalle;
private javax.swing.JTextField jcomu;
private javax.swing.JTextField jmail;
private javax.swing.JTextField jmuni;
private javax.swing.JTextField jnom;
private javax.swing.JTextField jtel;
// End of variables declaration

}

la tabla en mysql es:
CREATE TABLE `fechas` (
`id` int(10) unsigned NOT NULL auto_increment,
`nombre` varchar(30) NOT NULL,
`apellidos` varchar(30) NOT NULL,
`telefono` int(13) NOT NULL,
`mail` varchar(30) NOT NULL,
`sexo` varchar(10) NOT NULL,
`dia` varchar(3) NOT NULL,
`mes` varchar(10) NOT NULL,
`anio` varchar(5) NOT NULL,
`calle` varchar(30) NOT NULL,
`comunidad` varchar(30) NOT NULL,
`municipio` varchar(30) NOT NULL,
`estado` varchar(20) NOT NULL,
`fecha` varchar(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Opciones de visualización de comentarios

Seleccione la forma que prefiera para mostrar los comentarios y haga clic en «Guardar las opciones» para activar los cambios.
Imagen de ezamudio

Limpialo primero

No lo abras así como está, a menos que quieras dejarlo como ejemplo de lo que no se debe hacer en aplicaciones reales, mezclando código de GUI con código de conexión a base de datos y código de control, todo en una misma clase, con los datos de conexión (url, driver, etc) en código duro, sin manejo real de errores/excepciones...

Te falta limpiar mucho ese código, o de plano reescribirlo separando las distintas funciones en distintas clases. No porque algo corra significa que está bien hecho... algunas sugerencias:

- El código de interfaz gráfica lo puedes tener en una o varias clases
- El código de manejo de datos en base de datos lo debes tener en otra clase separada (busca DAO o DAC que significa Data Access Object/Component para que te familiarices con ese patrón de diseño)
- Manejar los errores presentándolos al usuario en la interfaz gráfica, y cerrando la aplicación cuando son errores fatales (por ejemplo, si no hay conexión a la base de datos, no tiene caso correr el programa porque no se puede hacer nada).
- El DAO debe tener propiedades para usuario, password, url, etc para conectarse a la base de datos, o bien recibir un DataSource ya configurado para simplemente obtener de ahí las conexiones necesarias. O bien leer esos valores de un archivo de properties o algo similar, de manera que la aplicación se puede conectar a una base de datos distinta (siempre y cuando haya la misma tabla) simplemente modificando la configuración.
- Llena la tabla de años con un algoritmo que tome un rango de años dependiendo de la fecha actual, a menos que siempre SIEMPRE la aplicación requiera el rango 1980-2000
- Cierra el PreparedStatement (si existe) y luego la conexión.
- No caches Exception. No caches excepciones que no vas a manejar. Si solamente te interesan las de JDBC entonces cacha SQLException.

Algo que hiciste bien es cerrar la conexión a base de datos en el finally aunque debes checar que no sea nula, ya que se podría levantar excepción al tratar de obtener la conexión y entonces en el finally se arrojaría NPE.