You might need to provide a constraint. If your content pane has a BorderLayout, try content.add(imagePanel, BorderLayout.CENTER);
Evan Ken Miller wrote: > > I have an app that extends JFrame in which I add a JDesktopPane, and in that > I have a > couple of JInternalFrames that I use. In the main winow of the app (the > content pane of the JFrame if I am correct) I would like to put a tiled > image to serve as the background. I thought I was doing it correctly, but > nothing shows up. I created an ImagePanel class that extends JPanel, which > is listed below. > > I create a panel of the ImagePanel type and added it to the content > pane of JFrame (in the constructor of my app) by doing the following: > ImagePanel imagePanel = new ImagePanel(); > imagePanel.setVisible(true); > > Container content = getContentPane(); > content.add(imagePanel); > > I then go on to add the desktop and the internal frames. This doesn't seem > to work. Is there a flaw in my understanding on how to do this? > > Thanks in advance. > > Ken > _______________________________________________ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing
