Skip to content
Snippets Groups Projects
Commit d8955a6d authored by Dennis Toth's avatar Dennis Toth
Browse files

Upload New File

parent af910548
No related branches found
No related tags found
No related merge requests found
package notenmanager;
import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
import java.awt.*;
public class MainGUI extends JFrame {
public MainGUI() {
setTitle("Notenmanager");
setSize(960, 540);
setLocationRelativeTo(null);
setDefaultCloseOperation(EXIT_ON_CLOSE);
Container pane = getContentPane();
GroupLayout groupLayout = new GroupLayout(pane);
pane.setLayout(groupLayout);
JButton button = new JButton("Test");
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
System.out.println("TEST erfolgreich");
}
});
groupLayout.setVerticalGroup(groupLayout.createSequentialGroup().addComponent(button));
groupLayout.setHorizontalGroup(groupLayout.createSequentialGroup().addComponent(button));
groupLayout.setAutoCreateContainerGaps(true);
}
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
MainGUI main = new MainGUI();
main.setVisible(true);
}
});
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment