Size « Border « Java Swing Q&A





1. JFrame: get size without borders?    stackoverflow.com

In Java, is it possible to get the Width and Height of the JFrame without the title and other borders? frame.getWidth() and frame.getHeight()1 seems to return the width including the border. Thanks.

2. How do I make a JFrame a certain size, not including the border?    stackoverflow.com

I have a JFrame that I've set to a certain size, using setBounds. However, that makes the window, including the borders, that size (which in hindsight makes complete sense). But ...