Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Sortieren;
- import java.awt.Color;
- import java.awt.Font;
- import java.awt.Panel;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
- import javax.swing.JButton;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- import javax.swing.JScrollPane;
- import javax.swing.JTextArea;
- import javax.swing.JTextField;
- import javax.swing.ScrollPaneConstants;
- public class FrameMenue {
- JTextArea jTextAreaAusgabe;
- JScrollPane jScrollPaneAusgabe;
- JButton jButtonSchliessen;
- JButton jButtonGenerieren;
- JButton jButtonSortieren;
- JButton jButtonAnnehmen;
- JLabel jLabelAnzahl;
- JLabel jLabelMax;
- JLabel jLabelTZ;
- JLabel jLabelVZ;
- JTextField jTextFieldAnzahl;
- JTextField jTextFieldMax;
- JTextField jTextFieldTZ;
- JTextField jTextFieldVZ;
- public FrameMenue(){
- JFrame hf = new JFrame("Titel"); //hf = Hauptfenster
- hf.setSize(675, 400);
- hf.setResizable(false);
- hf.setLayout(null);
- hf.setVisible(true);
- hf.setDefaultCloseOperation(hf.EXIT_ON_CLOSE);
- hf.setLayout(null);
- jButtonSchliessen = new JButton("Schliessen");
- jButtonSchliessen.setBounds(560, 340, 100, 25);
- jButtonSchliessen.setFont(new Font ("Arial", Font.BOLD, 12));
- jButtonSchliessen.setBackground(Color.LIGHT_GRAY);
- jButtonSchliessen.addActionListener(new java.awt.event.ActionListener(){
- public void actionPerformed(java.awt.event.ActionEvent e){
- System.exit(0);
- }
- });
- hf.add(jButtonSchliessen);
- jTextAreaAusgabe = new JTextArea("");
- jScrollPaneAusgabe = new JScrollPane(jTextAreaAusgabe);
- jScrollPaneAusgabe.setBounds(0, 0, 200, 370);
- jScrollPaneAusgabe.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
- jScrollPaneAusgabe.setViewportView(jTextAreaAusgabe);
- hf.getContentPane().add(jScrollPaneAusgabe);
- jButtonGenerieren = new JButton("Zahlen Generieren");
- jButtonGenerieren.setBounds(225, 10, 150, 25);
- jButtonGenerieren.setFont(new Font ("Arial", Font.PLAIN, 12));
- hf.add(jButtonGenerieren);
- jButtonSortieren = new JButton("Sortieren");
- jButtonSortieren.setBounds(225, 60, 150, 25);
- jButtonSortieren.setFont(new Font ("Arial", Font.PLAIN, 12));
- hf.add(jButtonSortieren);
- jLabelAnzahl = new JLabel("Anzahl der Zahlen:");
- jLabelAnzahl.setText("Test");
- jLabelAnzahl.setBounds(400, 10, 180, 25);
- jLabelAnzahl.setFont(new Font("Arial", Font.PLAIN, 12));
- jLabelAnzahl.setBackground( Color.black );
- jLabelAnzahl.setVisible(true);
- hf.add(jLabelAnzahl);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement