#navi(contents-page-name): No such page: ST

FrontPage

Terai Atsuhiro 2023-05-21 (日) 13:43:14

http://terai.s55.xrea.com/swing/backgroundimage/screenshot.png

public void paintComponent(Graphics g) {
  Dimension d = getSize();
  int w = bgimage.getIconWidth();
  int h = bgimage.getIconHeight();
  for(int i=0;i*w<d.width;i++) {
    for(int j=0;j*h<d.height;j++) {
      g.drawImage(bgimage.getImage(), i*w, j*h, w, h, null);
    }
  }
  //setOpaque(false);
  super.paintComponent(g);
}