$30 off During Our Annual Pro Sale. View Details »

CSC308 Lecture 05

CSC308 Lecture 05

Software Engineering I
Implementation
(202209)

Javier Gonzalez-Sanchez
PRO

September 28, 2022
Tweet

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming

Transcript

  1. jgs CSC 308 Software Engineering I Lecture 05: Implementation Dr.

    Javier Gonzalez-Sanchez javiergs@calpoly.edu users.csc.calpoly.edu/~javiergs | javiergs.com Building 14 -227 Office Hours: By appointment
  2. jgs Fall 2022 | 00000010 Activities § Construction or Coding

    § Testing (Unit, UI, Integration, Stress, Regression)
  3. jgs More About GUI

  4. jgs Fall 2022 | 00000010 Layouts import javax.swing.*; public class

    Example extends JFrame{ public Example() { super("Hello World Swing"); GridLayout layout = new GridLayout(3,2); setLayout(layout); JLabel label = new JLabel("Hello World"); add(label); JButton button = new JButton("Click Me"); add(button); JTextField text = new JTextField("Text", 10); add(text); JCheckBox check = new JCheckBox("Option"); add(check); } public static void main(String[] args) { Example frame = new Example(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(500,500); frame.setVisible(true); } }
  5. jgs Fall 2022 | 00000010 import javax.swing.*; public class Example

    extends JFrame{ public Example() { super("Hello World Swing"); BorderLayout layout = new BorderLayout(); setLayout(layout); JLabel label = new JLabel("Hello World"); add(label, BorderLayout.CENTER); JButton button = new JButton("Click Me"); add(button , BorderLayout.SOUTH); JTextField text = new JTextField("Text", 10); add(text , BorderLayout.NORTH); JCheckBox check = new JCheckBox("Option"); add(check , BorderLayout.EAST); } public static void main(String[] args) { Example frame = new Example(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(500,500); frame.setVisible(true); } } Layouts
  6. jgs Fall 2022 | 00000010 JPanel 2

  7. jgs Fall 2022 | 00000010 Pseudo Calculator

  8. jgs Fall 2022 | 00000010 Questions

  9. jgs

  10. jgs CSC 308 Software Engineering I Lab 05: Programming with

    Java IV Dr. Javier Gonzalez-Sanchez javiergs@calpoly.edu users.csc.calpoly.edu/~javiergs | javiergs.com Building 14 -227 Office Hours: By appointment
  11. jgs Previously

  12. jgs Fall 2022 | 00000010 Lab 02

  13. jgs Fall 2022 | 00000010 Lab 03 (part A)

  14. jgs Fall 2022 | 00000010 Lab 03 (part B)

  15. jgs Lab

  16. jgs Fall 2022 | 00000010 Lab 04 0

  17. jgs Fall 2022 | 00000010 Ideas

  18. jgs Fall 2022 | 00000010 Questions

  19. jgs CSC 308 Software Engineering I Javier Gonzalez-Sanchez, Ph.D. javiergs@calpoly.edu

    Fall 2022 Copyright. These slides can only be used as study material for the class CSC308 at Cal Poly. They cannot be distributed or used for another purpose.