I have come to this site for a few years looking for various issues and 99% of the time find my answer here (thank you by the way!) This time however I think I've programmed myself into a corner requiring a bit more of a specialized answer. I am writing an XMPP Client using the smack API for cross platform functionality, and I needed something I could use for displaying the roster easily for users. The JTree seemed like a natural fit for this (rosters are a collection of collections containing user objects, so just a two tier tree with leafs in each sub root). The problem I'm running into is that the tree doesn't resize itself upon being painted into the JPanel that contains it. I have to actually resize the window just a little to get it to expand to its own content size, and even then it never expands beyond the size of its content. I would like it to behave a bit more like a standard UI for a chat client (being resized to slightly smaller than the containing frame at all times).
Fair warning, while I would enjoy being a professional programmer I'm not a professional programmer by any means. I enjoy it, and its a hobby / something I do when asked to do so for work, but this isn't exactly 'pro code' here so please be gentle ;)
EDIT: This is the SSCCE as requested.