Inserting values from java GUI into postgresql data base
<p>I am having problems inserting data into a postgres table created using java. The created table part of the code works fine, its only when I am inserting values into the table that nothing happens. The code I am using to populate the table tt is:</p>

<pre><code>    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
      String txt1 = jTextField1.getText();
      int number = Integer.parseInt(txt1);
      String name= jTextField2.getText(); 
      String txt3 = jTextField3.getText();
      int mean = Integer.parseInt(txt3);
      Connection c = null;
      Statement stmt = null;
      try {
         Class.forName("org.postgresql.Driver");
         c = DriverManager.getConnection("jdbc:postgresql://localhost:5432/tst", "postgres", "21262050");
         c.setAutoCommit(false);
         System.out.println("Opened database successfully");
         String sql  = "INSERT INTO tt(noun, max, nbr) VALUES(?, ?, ?)";
         PreparedStatement pst =  c.prepareStatement(sql);
         pst.setString(1, name);
         pst.setInt(2,mean );
         pst.setInt(3, number);

         pst.executeUpdate();

      } catch (SQLException ex) {
            Logger.getLogger(insrt.class.getName()).log(Level.SEVERE, null, ex);
      }


      catch(Exception e){
            e.printStackTrace();
        }

    }                                        

    public static void main(String args[]) {

        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new insrt().setVisible(true);
            }
        });
    }
</code></pre>