// Position the message to center it in the frame protected void positionContents() { message.moveTo(displayLeft(), displayTop()); message.move( (displayWidth() - message.getWidth()) / 2, (displayHeight() - message.getHeight()) / 2); }