Update oknoPIN.java
This commit is contained in:
parent
c4d25f7269
commit
d80a2663cd
@ -1,4 +1,5 @@
|
||||
import java.awt.EventQueue;
|
||||
import java.awt.Toolkit;
|
||||
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
@ -17,10 +18,11 @@ import javax.swing.JPasswordField;
|
||||
import javax.swing.JButton;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.Font;
|
||||
|
||||
public class oknoPIN {
|
||||
|
||||
private JFrame Fame;
|
||||
private JFrame PodajPin;
|
||||
private JPasswordField passwordField;
|
||||
|
||||
/**
|
||||
@ -31,7 +33,7 @@ public class oknoPIN {
|
||||
public void run() {
|
||||
try {
|
||||
oknoPIN window = new oknoPIN();
|
||||
window.Fame.setVisible(true);
|
||||
window.PodajPin.setVisible(true);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -50,33 +52,38 @@ public class oknoPIN {
|
||||
* Initialize the contents of the frame.
|
||||
*/
|
||||
private void initialize() {
|
||||
Fame = new JFrame();
|
||||
Fame.setTitle("Podaj PIN");
|
||||
Fame.setBounds(100, 100, 528, 306);
|
||||
Fame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
Fame.getContentPane().setLayout(null);
|
||||
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);
|
||||
|
||||
JLabel lblOknoPin = new JLabel("Podaj sw\u00F3j PIN");
|
||||
lblOknoPin.setBounds(165, 58, 167, 58);
|
||||
lblOknoPin.setFont(new Font("Tahoma", Font.PLAIN, 56));
|
||||
lblOknoPin.setBounds(608, 128, 440, 58);
|
||||
lblOknoPin.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
lblOknoPin.setBackground(Color.YELLOW);
|
||||
lblOknoPin.setForeground(Color.BLUE);
|
||||
Fame.getContentPane().add(lblOknoPin);
|
||||
PodajPin.getContentPane().add(lblOknoPin);
|
||||
|
||||
passwordField = new JPasswordField(0);
|
||||
passwordField.setFont(new Font("Tahoma", Font.PLAIN, 60));
|
||||
passwordField.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
passwordField.setToolTipText("4 cyfry PIN");
|
||||
passwordField.setBounds(205, 111, 89, 22);
|
||||
Fame.getContentPane().add(passwordField);
|
||||
passwordField.setBounds(753, 211, 157, 73);
|
||||
PodajPin.getContentPane().add(passwordField);
|
||||
|
||||
JButton btnZaloguj = new JButton("Zaloguj");
|
||||
btnZaloguj.setFont(new Font("Tahoma", Font.PLAIN, 50));
|
||||
btnZaloguj.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
PodajPin.setVisible(false);
|
||||
DrukujBilet wybierzMenu = new DrukujBilet();
|
||||
wybierzMenu.oknoDrukujBilet();
|
||||
}
|
||||
});
|
||||
btnZaloguj.setBounds(205, 165, 97, 25);
|
||||
Fame.getContentPane().add(btnZaloguj);
|
||||
btnZaloguj.setBounds(724, 298, 213, 69);
|
||||
PodajPin.getContentPane().add(btnZaloguj);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user