Update DrukujBilet.java
This commit is contained in:
parent
d80a2663cd
commit
25aee8c0b0
@ -1,4 +1,5 @@
|
||||
import java.awt.EventQueue;
|
||||
import java.awt.Toolkit;
|
||||
|
||||
import javax.swing.JFrame;
|
||||
import java.awt.Component;
|
||||
@ -6,10 +7,15 @@ import javax.swing.Box;
|
||||
import java.awt.Dimension;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JToggleButton;
|
||||
import javax.swing.JButton;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.Font;
|
||||
import java.awt.Color;
|
||||
|
||||
public class DrukujBilet {
|
||||
|
||||
private JFrame frame;
|
||||
private JFrame MenuStolowkaZPM;
|
||||
|
||||
/**
|
||||
* Launch the application.
|
||||
@ -19,7 +25,7 @@ public class DrukujBilet {
|
||||
public void run() {
|
||||
try {
|
||||
DrukujBilet window = new DrukujBilet();
|
||||
window.frame.setVisible(true);
|
||||
window.MenuStolowkaZPM.setVisible(true);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -38,33 +44,43 @@ public class DrukujBilet {
|
||||
* Initialize the contents of the frame.
|
||||
*/
|
||||
private void initialize() {
|
||||
frame = new JFrame();
|
||||
frame.setBounds(100, 100, 450, 300);
|
||||
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
frame.getContentPane().setLayout(null);
|
||||
|
||||
Component rigidArea = Box.createRigidArea(new Dimension(20, 20));
|
||||
rigidArea.setBounds(76, 66, 287, 162);
|
||||
frame.getContentPane().add(rigidArea);
|
||||
MenuStolowkaZPM = new JFrame();
|
||||
MenuStolowkaZPM.getContentPane().setForeground(Color.GREEN);
|
||||
MenuStolowkaZPM.setTitle("Menu Sto\u0142\u00F3wka ZPM");
|
||||
MenuStolowkaZPM.setBounds(100, 100, 450, 300);
|
||||
MenuStolowkaZPM.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
MenuStolowkaZPM.getContentPane().setLayout(null);
|
||||
MenuStolowkaZPM.setSize(1700, 900);
|
||||
|
||||
JLabel lblMenu = new JLabel("Menu");
|
||||
lblMenu.setBounds(43, 24, 56, 16);
|
||||
frame.getContentPane().add(lblMenu);
|
||||
lblMenu.setBackground(Color.GREEN);
|
||||
lblMenu.setFont(new Font("Tahoma", Font.PLAIN, 50));
|
||||
lblMenu.setBounds(43, 13, 232, 40);
|
||||
MenuStolowkaZPM.getContentPane().add(lblMenu);
|
||||
|
||||
JToggleButton tglbtnNewToggleButton = new JToggleButton("New toggle button");
|
||||
tglbtnNewToggleButton.setBounds(12, 66, 137, 25);
|
||||
frame.getContentPane().add(tglbtnNewToggleButton);
|
||||
tglbtnNewToggleButton.setBounds(32, 66, 137, 25);
|
||||
MenuStolowkaZPM.getContentPane().add(tglbtnNewToggleButton);
|
||||
|
||||
JToggleButton tglbtnNewToggleButton_1 = new JToggleButton("New toggle button");
|
||||
tglbtnNewToggleButton_1.setBounds(283, 66, 137, 25);
|
||||
frame.getContentPane().add(tglbtnNewToggleButton_1);
|
||||
tglbtnNewToggleButton_1.setBounds(192, 66, 137, 25);
|
||||
MenuStolowkaZPM.getContentPane().add(tglbtnNewToggleButton_1);
|
||||
|
||||
JToggleButton tglbtnNewToggleButton_2 = new JToggleButton("New toggle button");
|
||||
tglbtnNewToggleButton_2.setBounds(12, 184, 137, 25);
|
||||
frame.getContentPane().add(tglbtnNewToggleButton_2);
|
||||
tglbtnNewToggleButton_2.setBounds(32, 104, 137, 25);
|
||||
MenuStolowkaZPM.getContentPane().add(tglbtnNewToggleButton_2);
|
||||
|
||||
JToggleButton tglbtnNewToggleButton_3 = new JToggleButton("New toggle button");
|
||||
tglbtnNewToggleButton_3.setBounds(283, 184, 137, 25);
|
||||
frame.getContentPane().add(tglbtnNewToggleButton_3);
|
||||
tglbtnNewToggleButton_3.setBounds(192, 104, 137, 25);
|
||||
MenuStolowkaZPM.getContentPane().add(tglbtnNewToggleButton_3);
|
||||
|
||||
JButton btnNewButton = new JButton("Wybierz zaznaczone / Drukuj bilet");
|
||||
btnNewButton.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
MenuStolowkaZPM.setVisible(false);
|
||||
}
|
||||
});
|
||||
btnNewButton.setBounds(32, 160, 340, 43);
|
||||
MenuStolowkaZPM.getContentPane().add(btnNewButton);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user