// Do not update the view if ctrl is pressed.
if ((e.getModifiersEx() & MouseEvent.CTRL_DOWN_MASK) == 0) {
CoordinateFormat mCord = CoordinateFormat.getDefaultFormat();
LatLon p = mv.getLatLon(e.getX(),e.getY());
latText.setText(p.latToString(mCord));
lonText.setText(p.lonToString(mCord));
}
}
});
setLayout(new GridBagLayout());