/** Updates the stack scrollbar. */ public void updateSliceSelector() { if (hyperStack || zSelector == null) return; int stackSize = imp.getStackSize(); int max = zSelector.getMaximum(); if (max != (stackSize + 1)) zSelector.setMaximum(stackSize + 1); zSelector.setValue(imp.getCurrentSlice()); }