some refactoring/optimization (still not found out how to solve the
repaint/stack overflow problem, seems to have something to do with the
border of the vertexcomponent if it is shown and the component has
focus. There is no repaint without borders)