⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simplechess.java

📁 类似腾讯的聊天以及涂鸦的软件等等一系列的东西
💻 JAVA
字号:
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JApplet;
import javax.swing.JButton;
import javax.swing.JColorChooser;


public class simplechess extends JApplet{
	mychess chessboard;
	JButton change;
	public void init(){
		Container cont =getContentPane();
		cont.setLayout(new BorderLayout());
		chessboard =new mychess();
		cont.add("Center",chessboard);
		change=new JButton("change");
		cont.add("South",change);
		change.addActionListener(new ActionListener(){
			public void actionPerformed(ActionEvent e){
				Color board=JColorChooser.showDialog(simplechess.this, "棋盘颜色", chessboard.getBackground());
				chessboard.setBackground(board);
			}
		});
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -