title: Database in Netbeans onclick button
body: <p>I am following this tutorial about making a database in Netbeans:
  <a href="http://www.homeandlearn.co.uk/java/database_scrolling_buttons.html" rel="nofollow">http://www.homeandlearn.co.uk/java/database_scrolling_buttons.html</a>
  I have a button Next on my JPanel, which must call this method:</p>
  
  <pre class="lang-java prettyprint-override"><code>private void btnNextActionPerformed(java.awt.event.ActionEvent evt) {                                        
      try {
          String host = "jdbc:derby://localhost:1527/Employees";
          String uName = "bjorn";
          String uPass= "";
          conN = DriverManager.getConnection( host, uName, uPass );
          stmtN = conN.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
          String SQL = "SELECT * FROM App.Workers";
          rsN = stmtN.executeQuery( SQL );
  
          if ( rsN.next( ) ) {
              int id_col = rsN.getInt("ID");
              String id = Integer.toString(id_col);
              String first_name = rsN.getString("First_Name");
              String last_name = rsN.getString("Last_Name");
              String job = rsN.getString("Job_Title");
  
              textID.setText(id);
              textFirstName.setText(first_name);
              textLastName.setText(last_name);
              textJobTitle.setText(job);
          }
          else {
              rsN.previous( );
              JOptionPane.showMessageDialog(Workers.this, "End of File");
          }
      }
      catch (SQLException err) {
          JOptionPane.showMessageDialog(Workers.this, err.getMessage());
      }        // TODO add your handling code here:
  }        
  </code></pre>
  
  <p>This method must show the next entry of the database on the JPanel, but I can't get it working. Does someone know what I am doing wrong?</p>