Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JButton btnLoad = new JButton("Load Games");
- btnLoad.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- try
- {
- DriverManager.getConnection("jdbc:mysql://localhost:3306/tupaness","root","");
- Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/tupaness","root","");
- PreparedStatement ps = conn.prepareStatement("select * from games where genre = 'racing'");
- ResultSet rs = ps.executeQuery();
- table.setModel(DbUtils.resultSetToTableModel(rs));
- }catch(Exception error)
- {
- JOptionPane.showMessageDialog(null, error);
- }
- }
- });
- JButton btnCheckout = new JButton("Checkout");
- btnCheckout.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- racingUsr.setVisible(false);
- for(int rcount=50;rcount<table.getRowCount();rcount--){
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement