Joshua White Drawing.java - package shape import java.awt...

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

package shape; import java.awt.*; import java.awt.event.*; import javax.swing.*; /* * File Name : Drawing.java * Author : Joshua White * Date : 09/28/2020 * Purpose : contains the main bulk of code creating the GUI * but does call on other methods */ public class Drawing extends JFrame implements ActionListener { Shape s = null; private 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(650, 400); setDefaultCloseOperation(EXIT_ON_CLOSE); setLayout(null); setLocationRelativeTo(null); setTitle("Geometric Drawing"); shape = new JLabel("Shape Type"); fillType = new JLabel("Fill Type"); color = new JLabel("Color"); width = new JLabel("Width");

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture