Update DrukujBilet.java
This commit is contained in:
parent
3c599a09b1
commit
bd3269fd3d
@ -1,4 +1,6 @@
|
||||
//import javax.swing.AbstractButton;
|
||||
import javax.comm.SerialPort;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
@ -14,7 +16,7 @@ import java.sql.ResultSet;
|
||||
import java.awt.EventQueue;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Calendar;
|
||||
import java.util.GregorianCalendar;
|
||||
//import java.util.GregorianCalendar;
|
||||
import java.util.TimeZone;
|
||||
import java.awt.Font;
|
||||
import java.awt.Color;
|
||||
@ -37,7 +39,18 @@ import javax.swing.UIManager;
|
||||
//import java.awt.event.MouseListener;
|
||||
|
||||
import javax.swing.JTextArea;
|
||||
import javax.swing.ImageIcon;
|
||||
//import javax.comm.SerialPort;
|
||||
//import javax.comm.CommPort;
|
||||
//import javax.comm.SerialPortEventListener;
|
||||
//import javax.comm.CommDriver;
|
||||
//import javax.swing.ImageIcon;
|
||||
//import jssc.SerialPort;
|
||||
//import jssc.SerialPortEvent;
|
||||
//import jssc.SerialPortException;
|
||||
//import jssc.SerialPortList;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
||||
|
||||
public class DrukujBilet extends StolowkaZPM {
|
||||
|
||||
@ -88,8 +101,10 @@ public class DrukujBilet extends StolowkaZPM {
|
||||
public void run() {
|
||||
try {
|
||||
for(;;) {
|
||||
Calendar cal = new GregorianCalendar();
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTimeZone(TimeZone.getTimeZone("Europe/Warsaw"));
|
||||
long timeInMillis = System.currentTimeMillis();
|
||||
cal.setTimeInMillis(timeInMillis);
|
||||
|
||||
int day = cal.get(Calendar.DAY_OF_MONTH);
|
||||
int month = cal.get(Calendar.MONTH);
|
||||
@ -195,7 +210,7 @@ public class DrukujBilet extends StolowkaZPM {
|
||||
|
||||
JTextArea txtrWybrano = new JTextArea();
|
||||
txtrWybrano.setEditable(false);
|
||||
txtrWybrano.setText("Suma kosztow wybranych da\u0144: 25 z\u0142");
|
||||
//txtrWybrano.setText("Suma kosztow wybranych dań: 25 PLN");
|
||||
txtrWybrano.setForeground(Color.BLACK);
|
||||
txtrWybrano.setBackground(Color.WHITE);
|
||||
txtrWybrano.setLineWrap(true);
|
||||
@ -424,7 +439,7 @@ public class DrukujBilet extends StolowkaZPM {
|
||||
//@SuppressWarnings("unused")
|
||||
//int jakiWiersz = selectedRow;
|
||||
JOptionPane.showMessageDialog(null,"WYBRANO");
|
||||
txtrWybrano.setText("Suma kosztów wybranych pozycji: "+sumaKoszt+" z³");
|
||||
txtrWybrano.setText("Suma kosztów wybranych pozycji: "+sumaKoszt+" zlotych");
|
||||
|
||||
|
||||
}
|
||||
@ -468,6 +483,7 @@ public class DrukujBilet extends StolowkaZPM {
|
||||
pst.setString(4, "nie");
|
||||
pst.execute();
|
||||
|
||||
|
||||
rs.close();
|
||||
pst.close();
|
||||
MenuStolowkaZPM.setVisible(false);
|
||||
@ -484,7 +500,8 @@ public class DrukujBilet extends StolowkaZPM {
|
||||
}
|
||||
|
||||
}
|
||||
}});
|
||||
}
|
||||
});
|
||||
pst.close();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user