int paneLoc = findFirstRecordLocBySid(PaneRecord.sid);
if (paneLoc != -1)
_records.remove(paneLoc);
int loc = findFirstRecordLocBySid(WindowTwoRecord.sid);
PaneRecord pane = new PaneRecord();
pane.setX((short)colSplit);
pane.setY((short)rowSplit);
pane.setTopRow((short) topRow);
pane.setLeftColumn((short) leftmostColumn);
if (rowSplit == 0) {
pane.setTopRow((short)0);
pane.setActivePane((short)1);
} else if (colSplit == 0) {
pane.setLeftColumn((short)64);
pane.setActivePane((short)2);
} else {
pane.setActivePane((short)0);
}
_records.add(loc+1, pane);
windowTwo.setFreezePanes(true);
windowTwo.setFreezePanesNoSplit(true);
SelectionRecord sel = (SelectionRecord) findFirstRecordBySid(SelectionRecord.sid);
sel.setPane((byte)pane.getActivePane());
}