package grade; import javax.swing.*; import java.awt.*; public class FillInTheBlankGraderView extends JPanel { public FillInTheBlankGraderView(JFrame main) { mainFrame = main; main.add(this); this.add(questionLabel); this.add(questionTextField); this.add(studentAnswerLabel); this.add(studentAnswerTextField); this.add(answerLabel); this.add(answerTextField); this.add(markAsCorrectButton); this.add(previousStudentButton); this.add(nextStudentButton); } private JFrame mainFrame; /** * The question text. */ private JLabel questionLabel = new JLabel("Question:"); private JTextArea questionTextField = new JTextArea(10, 20); /** * The student's response to the question, deemed incorrect by RAINBOW. */ private JLabel studentAnswerLabel = new JLabel("Student Answer:"); private JTextField studentAnswerTextField = new JTextField(5); /** * The correct response to the question. */ private JLabel answerLabel = new JLabel("Answer:"); private JTextField answerTextField = new JTextField(5); /** * Marks the answer as correct. This causes a prompt to appear, asking if * the student's answer should be added to the answer key. */ private JButton markAsCorrectButton = new JButton("Mark As Correct"); /** * Takes the grader to the previous student's answer. */ private JButton previousStudentButton = new JButton("Previous Student"); /** * Takes the grader to the next student's answer. */ private JButton nextStudentButton = new JButton("Next Student"); }