Update DrukujBilet.java

This commit is contained in:
s441433 2019-01-11 06:07:56 +01:00
parent 1af2581a37
commit db79e74819

View File

@ -37,6 +37,7 @@ import javax.swing.UIManager;
//import java.awt.event.MouseListener;
import javax.swing.JTextArea;
import javax.swing.ImageIcon;
public class DrukujBilet extends StolowkaZPM {
@ -132,19 +133,20 @@ public class DrukujBilet extends StolowkaZPM {
conn=SQLiteConnection.dbConnector();
MenuStolowkaZPM = new JFrame();
MenuStolowkaZPM.getContentPane().setBackground(Color.WHITE);
MenuStolowkaZPM.getContentPane().setForeground(Color.GREEN);
MenuStolowkaZPM.setTitle("Menu Sto\u0142\u00F3wka ZPM");
MenuStolowkaZPM.setBounds(100, 100, 450, 300);
MenuStolowkaZPM.setBounds(100, 50, 450, 300);
MenuStolowkaZPM.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
MenuStolowkaZPM.getContentPane().setLayout(null);
MenuStolowkaZPM.setResizable(false);
MenuStolowkaZPM.setSize(1700, 900);
MenuStolowkaZPM.setSize(1700, 950);
JLabel lblMenu = new JLabel("MENU (Sto\u0142\u00F3wka ZPM)");
lblMenu.setHorizontalAlignment(SwingConstants.CENTER);
lblMenu.setBackground(Color.GREEN);
lblMenu.setFont(new Font("Tahoma", Font.PLAIN, 50));
lblMenu.setBounds(419, 32, 864, 91);
lblMenu.setBounds(489, 32, 724, 91);
MenuStolowkaZPM.getContentPane().add(lblMenu);
JLabel lblWybierzZMenu = new JLabel("Wybierz z tabeli co chcesz kupi\u0107");
@ -436,8 +438,23 @@ public class DrukujBilet extends StolowkaZPM {
btnNewButton.setForeground(Color.BLACK);
btnNewButton.setBackground(Color.GREEN);
btnNewButton.setFont(new Font("Tahoma", Font.PLAIN, 40));
btnNewButton.setBounds(515, 692, 694, 91);
btnNewButton.setBounds(519, 665, 694, 91);
MenuStolowkaZPM.getContentPane().add(btnNewButton);
JButton btnNewButton_2 = new JButton("ANULUJ transakcj\u0119");
btnNewButton_2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
MenuStolowkaZPM.setVisible(false);
}
});
btnNewButton_2.setBackground(Color.ORANGE);
btnNewButton_2.setBounds(764, 808, 214, 53);
MenuStolowkaZPM.getContentPane().add(btnNewButton_2);
JLabel lblNewLabel = new JLabel("");
lblNewLabel.setIcon(new ImageIcon("C:\\myGo\\icon.png"));
lblNewLabel.setBounds(432, 13, 132, 137);
MenuStolowkaZPM.getContentPane().add(lblNewLabel);
btnNewButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@ -450,7 +467,7 @@ public class DrukujBilet extends StolowkaZPM {
pst.setInt(3, sumaKoszt);
pst.setString(4, "nie");
pst.execute();
JOptionPane.showMessageDialog(null, " ** "+StolowkaZPM.IDuzytkownika+" ** "+dataIczas+" ** "+sumaKoszt+" ** "+"nie");
rs.close();
pst.close();
MenuStolowkaZPM.setVisible(false);
@ -470,5 +487,4 @@ public class DrukujBilet extends StolowkaZPM {
}});
pst.close();
}
}