// Alarm Clock Program! We show a frame that contains a split pane. The top // panel is the big clock. The bottom panel is for input of the alarm time. import javax.swing.*; public class Driver { public static void main(String [] args) { // Create a frame, with a panel that has vertical layout. JFrame frame = new JFrame("Alarm Clock"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ClockPanel clockPanel = new ClockPanel(); JPanel inputPanel = new InputPanel(clockPanel); // Add 2 panels to split pane, and put split pane in frame. JSplitPane pane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, clockPanel, inputPanel); frame.getContentPane().add(pane); frame.pack(); frame.show(); } }