40 likes | 52 Views
SE-1021 Software Engineering II. Week 5, Class 3 Completing the Calculator GUI layout. How can we create this calculator layout?. 112344. 5. Modify the code below to put the operators above the buttons…. +. -. *. /. /// in the constructor… setLayout(new BorderLayout());
E N D
SE-1021Software Engineering II • Week 5, Class 3 • Completing the Calculator GUI layout SE-2811 Dr. Josiah Yoder Slide style: Dr. Hornick
How can we create this calculator layout? 112344 5 Modify the code below to put the operators above the buttons… + - * / /// in the constructor… setLayout(new BorderLayout()); JPanel panel = createButtonPanel(); add(panel,BorderLayout.CENTER); 3 1 2 6 4 5 public JPanel createOperationPanel() { JPanel panel = new JPanel(); panel.add(new JButton("+")); panel.add(new JButton("-")); panel.add(new JButton("*")); panel.add(new JButton("/")); return panel; } 9 7 8 0 SE-2811 Dr. Josiah Yoder Slide style: Dr. Hornick
Get to know your classmates • Turn to a neighbor, and find out who traveled farther over Christmas break • When you have determined who traveled farther, that person should raise his hand SE-2811 Dr. Josiah Yoder Slide style: Dr. Hornick
What do we need to do to get our GUI to respond? In your groups of 2… • Write a list of as many things that you can think of as possible to complete the GUI application. • Favor quantity over quality SE-2811 Dr. Josiah Yoder Slide style: Dr. Hornick