This discussion is archived
1 Reply Latest reply: Feb 13, 2013 3:43 AM by 800268 RSS

JSplitPane behavior differs between MS Windows and Linux

989007 Newbie
Currently Being Moderated
I have a complicated GUI that uses a split pane to separate the data read from the server displayed in various components in the top part from the bottom part containing status messages regarding the validity of the data.

When run on MS Windows , when the users clicks "Reload" to refresh the top part of the GUI the data is loaded seamlessly. Prefect!

When run on Linux, when the users clicks "Reload" to refresh the top part of the GUI the split pane 's divider location gets set to zero, and therefore the status panel covers the entire panel. To see the new data the user needs to click once on the split pane divider.

Work around is to code if (sp.getDividerLocation == 0) sp.setDividerLocation(sp.getLastDividerLocation);

but this causes an ugly and unnecessary "blinking" of the GUI when run on a Linux workstation.

Anyone know of a better solution so the Linux JRE swing will not set divider location to zero when reloading?

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points