2019-01-06 17:06:43 +01:00
|
|
|
import java.awt.EventQueue;
|
2019-01-07 00:24:10 +01:00
|
|
|
import java.awt.Toolkit;
|
2019-01-06 17:06:43 +01:00
|
|
|
|
|
|
|
import javax.swing.JFrame;
|
|
|
|
import javax.swing.JLabel;
|
|
|
|
import java.awt.Color;
|
|
|
|
import javax.swing.SwingConstants;
|
|
|
|
import javax.swing.BoxLayout;
|
|
|
|
import javax.swing.JTree;
|
|
|
|
import javax.swing.JSlider;
|
|
|
|
import javax.swing.JToggleButton;
|
|
|
|
import com.jgoodies.forms.layout.FormLayout;
|
|
|
|
import com.jgoodies.forms.layout.ColumnSpec;
|
|
|
|
import com.jgoodies.forms.layout.RowSpec;
|
|
|
|
import com.jgoodies.forms.layout.FormSpecs;
|
|
|
|
import javax.swing.JTextField;
|
|
|
|
import javax.swing.JPasswordField;
|
|
|
|
import javax.swing.JButton;
|
|
|
|
import java.awt.event.ActionListener;
|
|
|
|
import java.awt.event.ActionEvent;
|
2019-01-07 00:24:10 +01:00
|
|
|
import java.awt.Font;
|
2019-01-06 17:06:43 +01:00
|
|
|
|
|
|
|
public class oknoPIN {
|
|
|
|
|
2019-01-07 00:24:10 +01:00
|
|
|
private JFrame PodajPin;
|
2019-01-06 17:06:43 +01:00
|
|
|
private JPasswordField passwordField;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Launch the application.
|
|
|
|
*/
|
|
|
|
public static void noweOkno() {
|
|
|
|
EventQueue.invokeLater(new Runnable() {
|
|
|
|
public void run() {
|
|
|
|
try {
|
|
|
|
oknoPIN window = new oknoPIN();
|
2019-01-07 00:24:10 +01:00
|
|
|
window.PodajPin.setVisible(true);
|
2019-01-06 17:06:43 +01:00
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create the application.
|
|
|
|
*/
|
|
|
|
public oknoPIN() {
|
|
|
|
initialize();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize the contents of the frame.
|
|
|
|
*/
|
|
|
|
private void initialize() {
|
2019-01-07 00:24:10 +01:00
|
|
|
PodajPin = new JFrame();
|
|
|
|
PodajPin.setTitle("Podaj PIN");
|
|
|
|
PodajPin.setBounds(100, 100, 528, 306);
|
|
|
|
PodajPin.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
|
|
|
PodajPin.getContentPane().setLayout(null);
|
|
|
|
PodajPin.setSize(1700, 600);
|
2019-01-06 17:06:43 +01:00
|
|
|
|
|
|
|
JLabel lblOknoPin = new JLabel("Podaj sw\u00F3j PIN");
|
2019-01-07 00:24:10 +01:00
|
|
|
lblOknoPin.setFont(new Font("Tahoma", Font.PLAIN, 56));
|
|
|
|
lblOknoPin.setBounds(608, 128, 440, 58);
|
2019-01-06 17:06:43 +01:00
|
|
|
lblOknoPin.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
|
lblOknoPin.setBackground(Color.YELLOW);
|
|
|
|
lblOknoPin.setForeground(Color.BLUE);
|
2019-01-07 00:24:10 +01:00
|
|
|
PodajPin.getContentPane().add(lblOknoPin);
|
2019-01-06 17:06:43 +01:00
|
|
|
|
|
|
|
passwordField = new JPasswordField(0);
|
2019-01-07 00:24:10 +01:00
|
|
|
passwordField.setFont(new Font("Tahoma", Font.PLAIN, 60));
|
2019-01-06 17:06:43 +01:00
|
|
|
passwordField.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
|
passwordField.setToolTipText("4 cyfry PIN");
|
2019-01-07 00:24:10 +01:00
|
|
|
passwordField.setBounds(753, 211, 157, 73);
|
|
|
|
PodajPin.getContentPane().add(passwordField);
|
2019-01-06 17:06:43 +01:00
|
|
|
|
|
|
|
JButton btnZaloguj = new JButton("Zaloguj");
|
2019-01-07 00:24:10 +01:00
|
|
|
btnZaloguj.setFont(new Font("Tahoma", Font.PLAIN, 50));
|
2019-01-06 17:06:43 +01:00
|
|
|
btnZaloguj.addActionListener(new ActionListener() {
|
|
|
|
public void actionPerformed(ActionEvent e) {
|
2019-01-07 00:24:10 +01:00
|
|
|
PodajPin.setVisible(false);
|
2019-01-06 17:06:43 +01:00
|
|
|
DrukujBilet wybierzMenu = new DrukujBilet();
|
|
|
|
wybierzMenu.oknoDrukujBilet();
|
|
|
|
}
|
|
|
|
});
|
2019-01-07 00:24:10 +01:00
|
|
|
btnZaloguj.setBounds(724, 298, 213, 69);
|
|
|
|
PodajPin.getContentPane().add(btnZaloguj);
|
2019-01-06 17:06:43 +01:00
|
|
|
}
|
|
|
|
}
|