Adding image to borderlayout CENTER
<p>I have a class Background that extends JPanel. The point of this class is that contains an image that is displayed on it.</p>

<p>I also have a class GraphTest that extends JFrame (this is the programs main window). In this frame, I have a menu with the option "new". When I press new, I am supposed to get a filechooser window where I can select a file. When I select a file, I want to create a Background object that contains the very same file as the image to display, and add the Background object to the Graphtests borderlayout CENTER.</p>

<p>How should I do this?</p>

<p>I am thinking along the lines of writing the Background class so that the constructor for it takes a String, which is the images filename.</p>

<p>So when the listener for the "new" button in Graphtest is pressed, it opens a filechooser that returns the filename of the selected image and sends that into the constructor for Background, creating a "Background bg = new Background(filechooser.filename.toString)" (i know that is not how to write it, but you get the idea) and then adds that object to the GraphTest borderlayout CENTER.</p>

<p>Is this a nice solution? Or would there be better ways of doing this?</p>
