90919293949596979899100
continue; if (f.getClass() != figure.getClass()) continue; Point fPos = f.center(); if (fPos.equals(pos)) { // There is already another figure there at this position, try 50 pixels to the lower right offset.x += 50; offset.y += 50;