Matanya Malca
Matanya Malca

Reputation: 1

Size differance of JOptionPane dialog box between java versions

I created a simple dialog box using JOptionPane but when I run it with Java 8 the dialog box is extremely small, however when running with Java 18 the size is reasonably normal. Why is there a differance between those versions and how to fix the program so it would run in Java 8 similar to what I got in Java 18.

Output of Java 18: output of Java 18

Output of Java 8: output of Java 8

I tried to change the text size with method UIManager.put("OptionPane.messageFont",...) but that changes only the text and didn't affect the size of other components (buttons, icons, etc.). I can't find the right command to simply "enlarge" the dialog box. Also I read through the API of JOptionPane but didn't find a reason for that diffarence.

Upvotes: 0

Views: 49

Answers (0)

Related Questions