The application always resizes its frame in order to ensure that the full image is always visible. Having a large frame is not always desirable. Read the documentation on the JScrollPane class. Instead of adding the Image Panel directly to the content pane, place the panel in a JScrollPane and add the scroll pane to the content pane. Display a large image and experiment with resizing the window. What difference does having a scroll pane make? Does this allow you to display images that would otherwise be too large for the screen?