// Miya Natsuhara // 07-08-2019 // CSE142 // TA: Grace Hopper // A short program providing a few examples of different commands you can use to create images // with DrawingPanel and Graphics. import java.awt.*; public class Drawing { public static void main(String[] args) { // int x = 3; // dimensions (in pixels) DrawingPanel panel = new DrawingPanel(500, 300); panel.setBackground(Color.YELLOW); Graphics g = panel.getGraphics(); // remember, Graphics by default starts out as black g.drawLine(10, 30, 100, 120); g.setColor(Color.GREEN); g.drawRect(200, 15, 90, 90); g.setColor(Color.RED); g.drawLine(200, 15, 290, 105); g.setColor(Color.MAGENTA); g.fillOval(200, 15, 90, 90); } }