graph.java
来自「TieTaeToe,外國的五子棋。初學者必看」· Java 代码 · 共 43 行
JAVA
43 行
package ticTacToe;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
public class Graph extends Frame
{
// Constructor
Graph()
{
setLayout(new FlowLayout() );
for(int i=0;i<10;i++)
{
Button b = new Button(i+"") ;
// ActionListener listener = new DigitListener(this);
// b.addActionListener(listener);
add( b ) ;
}
this.setSize(300, 300) ;
this.setVisible( true ) ;
addWindowListener( new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0); }});
}
public static void main( String [] args )
{
GridLayout glf = new GridLayout() ;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?