import java.awt.EventQueue; 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; public class oknoPIN { private JFrame Fame; private JPasswordField passwordField; /** * Launch the application. */ public static void noweOkno() { EventQueue.invokeLater(new Runnable() { public void run() { try { oknoPIN window = new oknoPIN(); window.Fame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } /** * Create the application. */ public oknoPIN() { initialize(); } /** * 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); JLabel lblOknoPin = new JLabel("Podaj sw\u00F3j PIN"); lblOknoPin.setBounds(165, 58, 167, 58); lblOknoPin.setHorizontalAlignment(SwingConstants.CENTER); lblOknoPin.setBackground(Color.YELLOW); lblOknoPin.setForeground(Color.BLUE); Fame.getContentPane().add(lblOknoPin); passwordField = new JPasswordField(0); passwordField.setHorizontalAlignment(SwingConstants.CENTER); passwordField.setToolTipText("4 cyfry PIN"); passwordField.setBounds(205, 111, 89, 22); Fame.getContentPane().add(passwordField); JButton btnZaloguj = new JButton("Zaloguj"); btnZaloguj.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { DrukujBilet wybierzMenu = new DrukujBilet(); wybierzMenu.oknoDrukujBilet(); } }); btnZaloguj.setBounds(205, 165, 97, 25); Fame.getContentPane().add(btnZaloguj); } }