Jes*_*ssy 7 java background-image jpanel
如何在JPANEL上放置图像背景?
JPanel pDraw = new JPanel(new GridLayout(ROWS,COLS,2,2));
pDraw.setPreferredSize(new Dimension(600,600)); //size of the JPanel
pDraw.setBackground(Color.RED); //How can I change the background from red color to image?
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
41094 次 |
| 最近记录: |