Page 873 - 3-2
P. 873

temp float(5,2));";
                                    int rs = stmt.executeUpdate(sql);
                                    //rs.close();
                                    }
                                    stmt.close();
                                    conn.close();


                            }catch(SQLException se1){
                                    se1.printStackTrace();
                            }catch(Exception ex){
                                    ex.printStackTrace();
                            }finally{
                                    try{
                                            if(stmt!=null)
                                                    stmt.close();
                                    }catch(SQLException se2){
                                    }
                                    try{
                                            if(conn!=null)
                                                    conn.close();
                                    }catch(SQLException se){
                                            se.printStackTrace();
                                    }
                            }
                      jframe.setVisible(true);
                      Select select=new Select();
                      Place place=new Place();
                      jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                            jframe.setBounds(100, 100, 500, 300);
                            contentPane = new JPanel();
                            contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
                            jframe.setContentPane(contentPane);
                            contentPane.setLayout(null);
                             for(int i = 1; i<= cnt; i++)
                            {
                              String name;
                              name = String.valueOf(i);
                                buttons[i]  = new JButton(name);
                                buttons[i].addActionListener(new ActionListener(){
                                                    public void actionPerformed(ActionEvent arg0)
                                                    {
                                                            for(int i=1;i<=cnt;i++)
                                                            {
                                                                    if(arg0.getSource()==buttons[i])
                                                                    {


                                                         - 873 -
   868   869   870   871   872   873   874   875   876   877   878