diff --git a/app/src/main/java/ch/nuth/zhaw/exbox/ExBoxFrame.java b/app/src/main/java/ch/nuth/zhaw/exbox/ExBoxFrame.java index 56b1746..3a68517 100644 --- a/app/src/main/java/ch/nuth/zhaw/exbox/ExBoxFrame.java +++ b/app/src/main/java/ch/nuth/zhaw/exbox/ExBoxFrame.java @@ -29,7 +29,6 @@ import java.util.Set; * @version 2.04 2021/9/11 Test as plugin */ public class ExBoxFrame extends JFrame implements ActionListener, ItemListener { - private final int UHDTHRESHOLD = 1920; private final String STANDARDENCODING = "UTF-8"; private JMenuItem connect, exit, open, test, retest, textView, graphicView, clear; @@ -155,8 +154,7 @@ public class ExBoxFrame extends JFrame implements ActionListener, ItemListener { ex.printStackTrace(); } - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); - double scaleFaktor = (screenSize.getWidth() <= UHDTHRESHOLD) ? 1 : 2; + double scaleFaktor = (double)Toolkit.getDefaultToolkit().getScreenResolution() / 96.0; setFontSize((int) (11 * scaleFaktor)); setSize(new Dimension((int) (400 * scaleFaktor), (int) (400 * scaleFaktor))); setTitle("ExBox");