User Tools

Site Tools



Lecture 1

Problem: How can a graphical user interface be added to Java programs?

  • JFrame allows us to create a window
  • We can add various widgets to a window
    • JButton
    • JTextField
  • Event driven programming
  • Deep down, a loop is constantly checking for changes
  • We can add an ActionListener to a GUI component
  • An action will cause the actionPerformed method to run


Lecture 2

Problem: How can a GUI be organized?

  • Useful widgets
    • JLabel
    • JRadioButton
    • JCheckBox
    • JTextArea
    • …many more
  • JOptionPane provides very basic I/O
  • Layout
    • FlowLayout
    • BorderLayout
    • GridLayout
    • BoxLayout



project/week12.txt · Last modified: 2010/05/11 14:48 by jtk