小编Ale*_*lex的帖子

Cafe Wall Illusion

这是我的代码的预期输出:

预期的结果

这是我的代码:

import java.awt.*;

public class CafeWall
{
    final static int MORTAR = 2;
    final static int WIDTH  = 650;
    final static int HEIGHT = 400;

    public static void main( String[] args )
    {
        StdDraw.setCanvasSize(WIDTH, HEIGHT);
        StdDraw.setXscale(0, WIDTH);
        StdDraw.setYscale(0, HEIGHT);

 // Change from Color.GRAY to change background color.
        StdDraw.setPenColor( Color.GRAY );
        StdDraw.filledRectangle(WIDTH/2, HEIGHT/2, WIDTH/2, HEIGHT/2);

 drawRow(    0, 378, 4, 20 );
 drawRow(   50, 300, 5, 30 );

 drawGrid(  10, 36, 4, 25, 0 );

 drawGrid( 250, 40,  3, 25, 10 …
Run Code Online (Sandbox Code Playgroud)

java swing awt

5
推荐指数
1
解决办法
7472
查看次数

标签 统计

awt ×1

java ×1

swing ×1