Hi !
Inside your maxView method, when one of the panels is maxed, you shouldn't bother with the four checks. Just put all panels on visible, and recalculate your bounds. Here is the updated code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| public void maxView(Point p) { if (maxed) { maxed = false; NW.setVisible(true); NE.setVisible(true); SW.setVisible(true); SE.setVisible(true); ratioWidth = oldRatioWidth; ratioHeight = oldRatioHeight; calculateViews(); calculateDividers(); } else { } } |
You see, even when green is maxed, you were clicking inside the bounds of the white box (the green and the white bounds overlap, even though the white box is invisible). This caused your code to enter the "wrong" block, the one for the white box.
BTW: nederlandse commentaar is niet voor iedereen even makkelijk te lezen
