int xCords = Math.max(0, evt.getX()); // prevent negative X coordinates
ViewportRanges ranges = av.getRanges();
int res = (xCords / av.getCharWidth())
int xCords = Math.max(0, evt.getX()); // prevent negative X coordinates
ViewportRanges ranges = av.getRanges();
int res = (xCords / av.getCharWidth())