創(chuàng)建了一個(gè)4*4的網(wǎng)格??panel1.setLayout(new GridLayout(1, 4));??panel2.setLayout(new GridLayout(1, 4));??panel3.setLayout(new GridLayout(1, 4));??panel4.setLayout(new GridLayout(1, 4));我又一些圖片,要放到網(wǎng)格中去,要怎么處理?
1 回答

lzjccc
TA貢獻(xiàn)23條經(jīng)驗(yàn) 獲得超7個(gè)贊
例如:panel1.add(new ImageIcon() );其會(huì)默認(rèn)從上至下從左往右填網(wǎng)格
添加回答
舉報(bào)
0/150
提交
取消