diff --git a/GUI.form b/GUI.form
index 9f0969c..8c3985c 100644
--- a/GUI.form
+++ b/GUI.form
@@ -37,6 +37,7 @@
+
diff --git a/GUI.java b/GUI.java
index b278843..e9f19bf 100644
--- a/GUI.java
+++ b/GUI.java
@@ -19,6 +19,17 @@ public class GUI extends JFrame {
@Override
public void actionPerformed(ActionEvent e) {
//TODO: Text vom Text field zu Eingabe übergeben
+ try {
+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ } catch (ClassNotFoundException classNotFoundException) {
+ classNotFoundException.printStackTrace();
+ } catch (InstantiationException instantiationException) {
+ instantiationException.printStackTrace();
+ } catch (IllegalAccessException illegalAccessException) {
+ illegalAccessException.printStackTrace();
+ } catch (UnsupportedLookAndFeelException unsupportedLookAndFeelException) {
+ unsupportedLookAndFeelException.printStackTrace();
+ }
Rechenmaschine rechner = new Rechenmaschine(textFieldRechenterm.getText());
labelErgebnis.setText("Das Ergebnis ist: "+rechner.getResult());
}
@@ -27,6 +38,7 @@ public class GUI extends JFrame {
public static void main(String[] args) {
JFrame frame = new GUI("Rechenterme");
+ frame.setLocationRelativeTo(null);
frame.setVisible(true);
}