Skip to content
Snippets Groups Projects
Commit 122c3d58 authored by Leon Dieter's avatar Leon Dieter
Browse files

windows scaling in progress

parent f3804344
Branches Übung
No related tags found
No related merge requests found
...@@ -110,8 +110,8 @@ public class GUI extends JFrame implements Runnable, ActionListener { ...@@ -110,8 +110,8 @@ public class GUI extends JFrame implements Runnable, ActionListener {
//Panel der Buttons auf der rechten Seite wird ausgeblendet //Panel der Buttons auf der rechten Seite wird ausgeblendet
//mainPane.add(createControlPanel(simu), BorderLayout.LINE_END); //mainPane.add(createControlPanel(simu), BorderLayout.LINE_END);
mainPane.add(createSerialLog(), BorderLayout.PAGE_END); mainPane.add(createSerialLog(), BorderLayout.PAGE_END);
this.setSize(xscale, yscale); //this.setSize(xscale, yscale);
//this.pack(); this.pack();
// this.setLocation(-1300, 0); //Mglichkeit die Renderingposition festzulegen // this.setLocation(-1300, 0); //Mglichkeit die Renderingposition festzulegen
this.setVisible(true); this.setVisible(true);
...@@ -119,21 +119,16 @@ public class GUI extends JFrame implements Runnable, ActionListener { ...@@ -119,21 +119,16 @@ public class GUI extends JFrame implements Runnable, ActionListener {
@Override @Override
public void componentResized(ComponentEvent e) { public void componentResized(ComponentEvent e) {
if(!(xscale == getWidth() && yscale == getHeight())) { if(!(xscale == getWidth() && yscale == getHeight())) {
if(modulPanel.getWidth() <= modulPanel.getHeight()) {
xscale = getWidth();
yscale = getHeight();
}
else {
xscale = getWidth();
yscale = getHeight();
} xscale = getWidth();
yscale = getHeight();
updateGUI(xscale, yscale);
updateGUI(xscale, yscale);
System.out.println("xScale: " + xscale + "\tyScale: " + yscale); System.out.println("xScale: " + xscale + "\tyScale: " + yscale);
} }
} }
...@@ -168,7 +163,7 @@ public class GUI extends JFrame implements Runnable, ActionListener { ...@@ -168,7 +163,7 @@ public class GUI extends JFrame implements Runnable, ActionListener {
modules[1].updateGUI(xscale, yscale); modules[1].updateGUI(xscale, yscale);
modules[2].updateGUI(xscale, yscale); modules[2].updateGUI(xscale, yscale);
modules[3].updateGUI(xscale, yscale); modules[3].updateGUI(xscale, yscale);
} }
......
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