Applet error - Null pointer exception?

The applet loads fine the first time I navigate to the page.

Upon refresh, i get java.lang.NullPointer exception.

Here is my java console information:

basic: Loading applet ...

basic: Initializing applet ...

basic: Starting applet ...

java.lang.NullPointerException

at JAppletTrial_1.populate_combobox(JAppletTrial_1.java:136)

at JAppletTrial_1.start(JAppletTrial_1.java:61)

at sun.applet.AppletPanel.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

basic: Exception: java.lang.NullPointerException

Exception in thread "thread applet-JAppletTrial_1.class" java.lang.NullPointerException

at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)

at sun.plugin.AppletViewer.showAppletException(Unknown Source)

at sun.applet.AppletPanel.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

My applet, populate combobox function looks like this:

public void populate_combobox(){

try {

ResultSet rs = selectStmt.executeQuery();

while(rs.next()) {

cboClass obj1 = new cboClass(rs.getString(2), rs.getString(3), rs.getString(1));

this.jcboPerson.addItem(obj1);

}

} catch(SQLException e) {

e.printStackTrace();

}

Like i say, it runs fine the first time. Refreshes will work after a while. Maybe some thread times out after a while? How do I make it work every time?

[1459 byte] By [joeasdfaa] at [2007-10-2 23:10:29]
# 1
Please don't cross post! http://forum.java.sun.com/thread.jspa?threadID=747428&messageID=4276738#4276738
sabre150a at 2007-7-14 6:24:31 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2
sorry. This posting won't be used.
joeasdfaa at 2007-7-14 6:24:31 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...