int fmHeight = rowHeight; int fmWidth = columnWidth;
   public void drawCursor()   {//      public void drawCursor(int row, int col)   {//                           int fmWidth, int fmHeight,//                           boolean insertMode, int crossHair,//                           boolean rulerFixed,//                           int cursorSize, Color colorCursor,//                           Color colorBg,Color colorWhite,//                           Font font,int botOffset) {      	int row = screen.getRow(screen.getLastPos());      	int col = screen.getCol(screen.getLastPos());      	int fmHeight = rowHeight;      	int fmWidth = columnWidth;      	int botOffset = screen.cursorBottOffset;      	int cursorSize = screen.cursorSize;      	boolean insertMode = screen.insertMode;      	boolean rulerFixed = screen.rulerFixed;      	int crossHair = screen.crossHair;         Graphics2D g2 = getDrawingArea();         switch (screen.cursorSize) {            case 0:               cursor.setRect(                     columnWidth * (col),                           (rowHeight * (row + 1)) - botOffset,                           columnWidth,                           1                           );               break;            case 1:               cursor.setRect(                     columnWidth * (col),                           (rowHeight * (row + 1) - rowHeight / 2),                           columnWidth,                           (rowHeight / 2) - botOffset                           );               break;            case 2:               cursor.setRect(                     columnWidth * (col),                           (rowHeight * row),                           columnWidth,                           rowHeight - botOffset                           );               break;         }         if (insertMode && cursorSize != 1) {               cursor.setRect(                     columnWidth * (col),                           (rowHeight * (row + 1) - rowHeight / 2),                           columnWidth,                           (rowHeight / 2) - botOffset                           );         }         Rectangle r = cursor.getBounds();         r.setSize(r.width,r.height);         g2.setColor(screen.colorCursor);         g2.setXORMode(screen.colorBg);         g2.fill(cursor);         screen.updateImage(r);         if (!rulerFixed) {            crossRow = row;            crossCol = col;            crossRect.setBounds(r);         }         else {            if (crossHair == 0) {               crossRow = row;               crossCol = col;               crossRect.setBounds(r);            }         }         switch (crossHair) {            case 1:  // horizontal               g2.drawLine(0,(rowHeight * (crossRow + 1))- botOffset,                           bi.getWidth(null),                           (rowHeight * (crossRow + 1))- botOffset);               screen.updateImage(0,rowHeight * (crossRow + 1)- botOffset,                              bi.getWidth(null),1);               break;            case 2:  // vertical               g2.drawLine(crossRect.x,0,crossRect.x,bi.getHeight(null) - rowHeight - rowHeight);               screen.updateImage(crossRect.x,0,1,bi.getHeight(null) - rowHeight - rowHeight);               break;            case 3:  // horizontal & vertical               g2.drawLine(0,(rowHeight * (crossRow + 1))- botOffset,                           bi.getWidth(null),                           (rowHeight * (crossRow + 1))- botOffset);               g2.drawLine(crossRect.x,0,crossRect.x,bi.getHeight(null) - rowHeight - rowHeight);               screen.updateImage(0,rowHeight * (crossRow + 1)- botOffset,                              bi.getWidth(null),1);               screen.updateImage(crossRect.x,0,1,bi.getHeight(null) - rowHeight - rowHeight);               break;         }         g2.dispose();         g2 = getWritingArea(screen.font);         g2.setPaint(screen.colorBg);         g2.fill(pArea);         g2.setColor(screen.colorWhite);         g2.drawString((row + 1) + "/" + (col + 1)                        ,(float)pArea.getX(),                        (float)pArea.getY() + rowHeight);         screen.updateImage(pArea.getBounds());         g2.dispose();   }