0 我有一個類球體,像粒子一樣移動,我想在球體背後放置背景圖像。如何爲Java中的JPanel添加背景圖像Swing 來源 2014-11-13 user3809868 +0 你可能想看看[這篇文章](http://stackoverflow.com/questions/1466240/how-to-set-an-image-as-a-background-for-frame-in- swing-gui-of-java) – Turing85 +0 你可能想看看這個:http://sourceforge.net/p/tus/code/HEAD/tree/tjacobs/ui/swing_ex/JPanelCustomBkground.java它更寬使用Paint而不是Image的解決方案...主要方法演示如何從圖像中獲取Paint – ControlAltDel +0 對於[示例](http://stackoverflow.com/a/3256941/230513)。 – trashgod
你可能想看看[這篇文章](http://stackoverflow.com/questions/1466240/how-to-set-an-image-as-a-background-for-frame-in- swing-gui-of-java) – Turing85
你可能想看看這個:http://sourceforge.net/p/tus/code/HEAD/tree/tjacobs/ui/swing_ex/JPanelCustomBkground.java它更寬使用Paint而不是Image的解決方案...主要方法演示如何從圖像中獲取Paint – ControlAltDel
對於[示例](http://stackoverflow.com/a/3256941/230513)。 – trashgod