JFrame:获得无边界的大小?

2022-01-24 00:00:00 java swing jframe awt

在Java中,是否可以在没有标题和其他边框的情况下获取JFrame的Width和Height?

In Java, is it possible to get the Width and Height of the JFrame without the title and other borders?

frame.getWidth() 和 frame.getHeight()1 似乎返回了包括边框在内的宽度.

frame.getWidth() and frame.getHeight()1 seems to return the width including the border.

谢谢.

推荐答案



frame.getContentPane().getSize();

相关文章