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

為了賬號安全,請及時綁定郵箱和手機立即綁定

請問我想在窗口添加一個按鈕怎么寫

https://img1.sycdn.imooc.com//5b7a390c000189fa04770386.jpg


package com.mch0dm1n.seticom;


import javax.swing.JButton;

import javax.swing.JFrame;


public class chuangkou extends JFrame {


public chuangkou() {

this.setTitle("智偉創(chuàng)造");

this.setBounds(300, 200, 580, 600);

this.setSize(580, 600);

this.setLocation(300, 200);

this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

this.setVisible(true);

this.setLocationRelativeTo(null);// 為null,啟動程序時窗口將置于屏幕的中央

JButton diamondsButton[][] = new JButton[6][5];//游戲按鈕數(shù)組?

}


public static void main(String[] args) {

new chuangkou();

}

}


正在回答

1 回答

你的按鈕沒有加入到窗口中。

this.add(Button);

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

請問我想在窗口添加一個按鈕怎么寫

我要回答 關注問題
微信客服

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

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號