Evan, Well I didn't set the Layout for the content pane because it was just the main JFrame and didn't think I needed to since I was adding a JDesktopPane to it and then putting the JInternalFrames inside the desktop. But I did try setting the content pane to BorderLayout and then setting the constraint to BorderLayout.CENTER when adding the image panel and nothing.
Any other ideas :) Thanks. Ken -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Evan McLain Sent: Friday, November 30, 2001 11:37 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Tiling a background image 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 _______________________________________________ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing