Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Button;
- import java.awt.Checkbox;
- import java.awt.Color;
- import java.awt.Font;
- import java.awt.Frame;
- import java.awt.Label;
- import java.awt.TextArea;
- import java.awt.TextField;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
- import javax.swing.BorderFactory;
- import javax.swing.JButton;
- import javax.swing.JCheckBox;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- import javax.swing.JTable;
- import javax.swing.JTextArea;
- import javax.swing.JTextField;
- import javax.swing.border.CompoundBorder;
- public class GUI implements ActionListener
- {
- JFrame mainframe=new JFrame("Software für Kalkulationen");
- JLabel ueberschrift=new JLabel();
- JLabel name=new JLabel();
- Button bcalc=new Button();
- Button vcalc=new Button();
- public void guierstellen() {
- mainframe.setBounds(100, 100, 400, 230);
- mainframe.setLayout(null);
- mainframe.setResizable(false);
- ueberschrift.setBounds(15,20,500,20);
- ueberschrift.setFont(new Font("Verdana", Font.BOLD,20));
- ueberschrift.setForeground(Color.BLACK);
- ueberschrift.setText("Software für Preiskalkulationen");
- name.setFont(new Font("Verdana", Font.PLAIN,14));
- name.setForeground(Color.BLACK);
- name.setBounds(50,60,500,30);
- name.setText("Wählen Sie aus folgenden Optionen aus:");
- bcalc.setFont(new Font("Verdana", Font.PLAIN, 16));
- bcalc.setBounds(65,100,250,30);
- bcalc.setLabel("Bezugspreiskalkulation");
- bcalc.addActionListener(this);
- vcalc.setFont(new Font("Verdana", Font.PLAIN, 16));
- vcalc.setBounds(65,140,250,30);
- vcalc.setLabel("Verkaufskalkulation");
- vcalc.addActionListener(this);
- mainframe.setVisible(true);
- mainframe.add(ueberschrift);
- mainframe.add(name);
- mainframe.add(bcalc);
- mainframe.add(vcalc);
- }
- public void actionPerformed(ActionEvent e)
- {
- if (e.getSource()==bcalc)
- {
- Bezugskalkulation bsp=new Bezugskalkulation();
- bsp.guierstellen();
- }
- else if (e.getSource()==vcalc)
- {
- Verkaufskalkulation bsp=new Verkaufskalkulation();
- Verkaufskalkulation.guierstellen();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement