Java 7: text field does not update size correctly