/** Cacluates logical position of x,y pixel values, but does not set the pos variable */ private int calculatePosition(int x, int y) { int row = baseEditorPanel.getRowForPixelPosition(y); int col = baseEditorPanel.getColForPixelPosition(x); // getColumnCount from super class SeqAlignPanel return (baseEditorPanel.getColumnCount() * row) + col; }