More on GUIs and Graphics - PowerPoint PPT Presentation

About This Presentation
Title:

More on GUIs and Graphics

Description:

Lecture 18. More on GUIs and Graphics. Selected examples from Chapters 12, 13, 14, 15. Please read details in the book. No need to memorize any of these details! ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 4
Provided by: michael1418
Category:
Tags: graphics | guis | more

less

Transcript and Presenter's Notes

Title: More on GUIs and Graphics


1
Lecture 18
  • More on GUIs and Graphics
  • Selected examples from Chapters 12, 13, 14, 15
  • Please read details in the book
  • No need to memorize any of these details!!!
  • HW7 please do something interesting and
    challenging with user interaction I will weight
    this assignment more than the others

2
Graphics
  • When the system needs to redisplay a window or
    window component, it calls paintComponent
  • Therefore, when we draw graphics on a swing
    component such as JPanel or JLabel or a
    user-defined subclass of one of these, we must
    put these statements inside an overriding
    paintComponent method
  • Our program should not call paintComponent. Only
    the system calls it.
  • When we want to make changes to a graphical
    display, we have to tell the system to call the
    overriding paintComponent. We do this by calling
    repaint().

3
Demos
  • TestSwingCommonFeatures
  • TestFigurePanel
  • TestMessagePanel
  • DisplayClock
  • change from a still to a moving clock
  • MoveMessageDemo
  • ClockAnimation
  • ButtonDemo
  • CheckBoxDemo
  • RadioButtonDemo
  • TextFieldDemo
  • TextAreaDemo
  • ComboBoxDemo
  • ScrollBarDemo
  • etc
Write a Comment
User Comments (0)
About PowerShow.com