當前位置:首頁 » 背景圖片 » swing背景圖片怎麼放在table下
擴展閱讀
微信背景圖片有顆粒 2024-07-27 18:12:24
接親環節搞笑圖片 2024-07-27 18:12:24
設計圖片素材網有哪些 2024-07-27 18:10:40

swing背景圖片怎麼放在table下

發布時間: 2024-02-09 17:07:20

㈠ Java swing 窗體如何設置背景圖片

background=newImageIcon("images/backImage.png");

backImage=newJLabel(background);

backImage.setBounds(0,0,background.getIconWidth(),

background.getIconHeight());

backPanel=(JPanel)this.getContentPane();

backPanel.setOpaque(false);

this.getLayeredPane().setLayout(null);

this.getLayeredPane().add(backImage,newInteger(Integer.MIN_VALUE));

backPanel.setLayout(newBorderLayout());

這個是我程序裡面復制出來的,效果就下面圖一樣。

㈡ 怎麼設置table欄背景圖片

table{
background-image:url("1.jpg");

}
設置背景圖片的樣式,然後添加圖片的路徑就可以了。