Drawing.java - import import import import import...

This preview shows page 1 - 2 out of 3 pages.

import java.awt.Dimension;import java.awt.Graphics;import java.awt.Point;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.BorderFactory;import javax.swing.JButton;import javax.swing.JComboBox;import javax.swing.JFrame;import javax.swing.JLabel;import javax.swing.JOptionPane;import javax.swing.JPanel;import javax.swing.JTextField;public class Drawing extends JFrame implements ActionListener {private static final long serialVersionUID = 1L;Shape s=null;// Controlsprivate JLabel shape;private JLabel fillType;private JLabel color;private JLabel width;private JLabel height;private JLabel x;private JLabel y;private JLabel printCount;private JComboBox<String> cshape;private JComboBox<String> cfillType;private JComboBox<String> ccolor;private JTextField twidth;private JTextField theight;private JTextField tx;private JTextField ty;private JButton draw;private JPanel panel;int shapeWidth;int shapeHeight;int shapeX;int shapeY;public Drawing() {setSize(700,300);

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture