第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

請(qǐng)教paintComponents()和paint()方法的區(qū)別

請(qǐng)教paintComponents()和paint()方法的區(qū)別

月亮島Superman 2017-06-03 00:31:05
public class TankClient extends Frame { public void paintComponents(Graphics g) { Color c = g.getColor(); g.setColor(Color.RED); g.fillOval(50, 50, 30, 30); g.setColor(c); } public void lauchFrame() { this.setBounds(80, 80, 800, 600); this.setVisible(true); this.setResizable(false); this.setTitle("TankWar"); this.setBackground(Color.GREEN); this.addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { System.exit(0); }}); } public static void main(String[] args) { new TankClient().lauchFrame(); }}請(qǐng)教下paintComponents()方法和paint()方法的區(qū)別在這個(gè)程序中使用paintComponents 劃不出來(lái)圓 ? 但是用paint()方法就可以這是為什么?
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 1673 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)