package gradertool.charts; import javax.swing.*; import java.awt.*; import java.awt.event.*; /** * This GUI represents the pie chart for the grader tool. This can * be found in section 2.6.2 of the requirements. This GUI contains * a generic picture of the pie chart. The user cannot move the slices * on the GUI because that would require more work than was required * for this milestone. */ public class PieChart extends JFrame { /** * Constructor for the pie chart GUI. */ public PieChart() { Box whole = new Box(BoxLayout.Y_AXIS); Box filler = new Box(BoxLayout.X_AXIS); filler.setMaximumSize(new Dimension(500, 23)); Box image = new Box(BoxLayout.X_AXIS); Box checker = new Box(BoxLayout.X_AXIS); ImageIcon im = new ImageIcon("gradertool/charts/images/piechart_proto.jpg"); JLabel imLab = new JLabel(im); image.add(imLab); whole.add(image); add(whole); setSize(new Dimension(550, 375)); setTitle("Pie Chart--CPE 308"); setVisible(true); } }