I have a JDialog that is being kicked off by a JFrame. This Dialog has a JScrollPane inside of it, with some content that is added before the JDialog's setVisible function is called with 'true'.
My problem is, with the content added, it causes the Scrollbars to change their location when setVisible is called. Since setVisible is blocking, I cannot make any calls to change the value of the scrollbars after setVisible.
I do not want to use invokeLater as its functionality is indeterminate in timing (if there is simply no other way, fine, but I don't like 'do it when you please' if I can avoid it).
Is there a way to ensure a call post-setVisible that does not rely on user interaction without using invokeLater?