我是一个有Java经验的初学者,所以我希望你能帮助我。
我想从JTextfield中读取步数。但是怎样才能使楼梯变得可变呢?
Graphics g = textP.getGraphics();
int x = 5;
int y = 20;
int width = 10;
int height = 10;
For循环1- whil给出6个片段的drawRect
for (int i = 0; i < 6; i++) {
g.drawRect(x, y * i, width, height);
}
For loo
我想在我的ui上画一个矩形矩阵。问题是,只有一个矩形,第一个矩阵,可见。
这是我的代码:
protected void onDraw(Canvas canvas) {
Paint p = new Paint();
p.setColor(Color.GRAY);
if (w != 0 && h != 0) {
a = w / 11;
space = a / 12;
System.out.println("w: " + w + ", h: " + h + ", a:
问题是,我看到它工作的唯一方式是创建一个while,这会创建一个无限循环。有没有办法让我的光标从0不透明度变为1不透明度,然后上下移动。这是我目前的代码...我正在努力寻找另一种方法来继续,但我真的看不到任何其他方法。
public var Alpha:Number = 1;
public var sense:String = "down";
private function thisMouseOver(e:MouseEvent):void{
Mouse.hide();
//draws the cursor
drawCur