當前位置:首頁 » 背景圖片 » swing背景圖片怎麼放在table下
擴展閱讀
ps5圖片手柄 2024-09-08 11:01:23
空中隨拍唯美圖片 2024-09-08 10:46:44

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");

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