JFrame maximized to screen size with Dimension
问题 All I can think is that I'm not setting the screen size correctly. Logs show that the height and width look correct. From the Swing trail: package net.bounceme.dur.nntp.swing; import java.awt.Dimension; import java.awt.Toolkit; import java.util.logging.Logger; import javax.swing.*; import java.awt.*; public class HelloWorldSwing { private static final Logger LOG = Logger.getLogger(HelloWorldSwing.class.getName()); private static void createAndShowGUI() { //Create and set up the window. JFrame