Two problems which seem to be linked.
1. Create an empty round rectangle and set it up to a certain size. Set width/height first. Calling getCenter will return null. This will break rendering.
Code:
RoundedRectangle rect = new RoundedRectangle(0f,0f,0f,0f,25f);
rect.setWidth(20);
rect.setHeight(20);
rect.setX(200);
rect.setY(200);
...
rect.getCenterX() <-- NPE
2. Create a round rectangle, set its x/y positions and do a contains check. An ArrayIndexOutOfBoundsException will be thrown.
Code:
RoundedRectangle rect = new RoundedRectangle(25f,25f,25f,25f,25f);
rect.setX(200);
rect.setY(200);
...
rect.contains(25,25);