I'm building a Java swing application that uses JSplitPanes. Sometimes when I'm testing my application, the JSplitPanes jump to their default position after certain actions. I can move the divider to any location, but the certain action always causes the divider to jump to the same position it was when the program first opened.
My code is too large to show samples of, so I would like to know in general what could cause this.
One thing I have tried is taking out a call to revalidate(), and that did stop the JSplitPanes from jumping. However, it caused another system (one that makes our menus dynamic) to stop working altogether.
Is there a way to stop the JSplitPanes from jumping without breaking the dynamic menu system?