If I'm not mistaken, frame.pack(); applies all of the changes to the content pane.