Re: jpg as background?

From: Evil Monkey (a_at_b.com)
Date: 12/28/03


Date: Sun, 28 Dec 2003 17:24:27 -0000


"ak" <spam@imagero.com> wrote in message news:bskr11$rm4$1@online.de...
> > Can i put a jpeg as a background for a panel or frame in swing??
> yes, you can, not only jpeg - any image.
>
> public class ImagePanel extends JPanel {
> Image img;
>
> public void paintComponent(Graphics g) {
> Insets insets = getInsets();
> if(img != null) {
> g.drawImage(img, insets.left, insets.top, null);
> }
> }

how do I tell it to locate the jpeg?? in the above code?? Do i just put it
in the same file??

thanks



Relevant Pages

  • Re: jpg as background?
    ... > Can i put a jpeg as a background for a panel or frame in swing?? ... Parade's bug ID 4190828: ...
    (comp.lang.java.gui)
  • Re: jpg as background?
    ... > Can i put a jpeg as a background for a panel or frame in swing?? ... yes, you can, not only jpeg - any image. ... public class ImagePanel extends JPanel { ...
    (comp.lang.java.gui)
  • jpg as background?
    ... Can i put a jpeg as a background for a panel or frame in swing?? ... Could I make it the background of my frame and set the panel to opaque? ...
    (comp.lang.java.gui)
  • Re: Ask EU Digital photo frames
    ... I was looking for an 8 incher (fnarr, fnarr) and preferably with a slideshow which could be set to change as slowly as once a day. ... They couldn't get the images on my USB stick or memory card to work either on the frame I bought or the demonstration one and they could get their cards to read on the frame I bought. ... Some applications will save the images in their own version of jpeg, I have seen this happen with Paint Shop pro f'rinstance; they are still jpegs but with subtle differences in filetyping and these are not necces celery read by applications that are expecting a standard jpeg. ...
    (uk.media.radio.archers)
  • Re: Ask EU Digital photo frames
    ... They couldn't get the images on my USB stick or memory card to work either on the frame I bought or the demonstration one and they could get their cards to read on the frame I bought. ... Some applications will save the images in their own version of jpeg, I have seen this happen with Paint Shop pro f'rinstance; they are still jpegs but with subtle differences in filetyping and these are not necces celery read by applications that are expecting a standard jpeg. ... mike dot mcmillan at ntlworld dot com ...
    (uk.media.radio.archers)