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

📄 billiardtable.java

📁 double link list code
💻 JAVA
字号:
import java.awt.*;
//Hao Chen
//0247604
//com132
//lab8
//dangerchen@hotmail.com
import java.applet.Applet;

public class BilliardTable{
    private Color tc;
    private int tx, ty, tw, th;
    BilliardTable (Color tc, int tx, int ty, int tw, int th)//constuctor
    {  this.tc=tc;//assign data into tc
       this.tx=tx;
       this.ty=ty;
       this.tw=tw;
       this.th=th;
    }

    public void draw (Graphics g)//draw method work for tables
    {   g.setColor(tc);
        g.fillRect(tx,ty,tw,th);//draw table
    }
    public Color getTableColor ()//return table's color
    {  return tc;
	}
    public int getTablex ()//return table's x position
    {  return tx;
	}
    public int getTabley ()//return table's y position
    {  return ty;
	}
    public int getTablew ()//return table's width
    {  return tw;
	}
    public int getTableh ()//return table's height
    {  return th;
    }
}


⌨️ 快捷键说明

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