otoken.java

来自「一个java的游戏程序」· Java 代码 · 共 21 行

JAVA
21
字号
import java.awt.*;import java.awt.event.*;/** * Realizes the superclass Token, and crates the O-Token used in games. */
class OToken extends Token {  /**   * Paints the token based on the graphical environment given as a parameter   * and the size given as dimention   */
  public void paint(Graphics g, Dimension d)    {	g.drawOval((int)(.1 * d.width),		   (int)(.1 * d.height),		   (int)(d.width * .8), 		   (int)(d.height * .8));    }}

⌨️ 快捷键说明

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