Draw Shapes That User Selects
问题 I need to create a program to draw shapes(user chooses with radio button), and whether or not the shape is filled(user chooses with check box). This is the code I have so far: import javax.swing.*; import java.awt.*; import java.awt.event.*; public class SelectShape extends JFrame implements ItemListener{ private JRadioButton line = new JRadioButton("Line"); private JRadioButton rect = new JRadioButton("Rectangle"); private JRadioButton oval = new JRadioButton("Oval"); private JCheckBox fill