When I create a JFrame with child components, it opens to the smallest possible width a window can be, when I expected the width to be the minimum size to display the contents of the window without horizontal scroll bars.
How do I determine what that minimum size should be? Obviously something in the UI knows, because when made wide enough, the horizontal scroll bar disappears. This is the state I want the window when created. How do I fetch that number, which I suspect I would return as an override to getPreferredSize? As far as a preferred height, that's arbitrary.