1     private Image backgroundImage = new ImageIcon(this.getClass().getResource("/images/beijingtupian.jpg")).getImage();  
2     public JPanel eastScrollPanel = new JPanel(){
3         private static final long serialVersionUID = 1L;    
4 
5         public void paintComponent(Graphics g) {
6              g.drawImage(backgroundImage, 0, 0, this);
7         }
8     };

 

相关文章:

  • 2021-12-10
  • 2022-02-07
  • 2021-10-27
  • 2021-06-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-20
  • 2021-08-29
  • 2022-01-16
  • 2022-12-23
  • 2021-10-01
  • 2022-12-23
  • 2021-05-21
相关资源
相似解决方案