Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CSC305 Lecture 06

CSC305 Lecture 06

Individual Software Design and Development
Libraries II
(202409)

Avatar for Javier Gonzalez-Sanchez

Javier Gonzalez-Sanchez PRO

October 03, 2025
Tweet

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming

Transcript

  1. Dr. Javier Gonzalez-Sanchez [email protected] www.javiergs.info o ffi ce: 14 -227

    CSC 305 Individual Software Design and Development Lecture 06. Libraries II
  2. MouseListener • public void mousePressed (MouseEvent e) {} • public

    void mouseClicked(MouseEvent e) { } • public void mouseRele a sed(MouseEvent e) { } • public void mouseEntered(MouseEvent e) { } • public void mouseExited(MouseEvent e) { } • public void mouseDr a gged(MouseEvent me) { } • public void mouseMoved(MouseEvent e) { } 17
  3. MouseMotionListener • public void mouseDr a gged(MouseEvent me) { }

    • public void mouseMoved(MouseEvent e) { } 18
  4. Lab

  5. Assignment 01 • When click on Open, show a JFileChooser

    to select a folder. • Re a d a ll f ile n a mes from the folder a nd displ a y them in the JList or JTextAre a . • Use the f irst f ile in the list to: • Count lines → dr a w a box sized by line count. • Count if / switch / for / while → dr a w a nother box sized by complexity. • Comp a ring box sizes should show di ff erence. For example: 100 lines a nd 100 control st a tements → both boxes s a me size. • If f ile h a s @ a uthor a nd @version → dr a w h a ppy/serious f a ce. Otherwise → dr a w s a d f a ce. • Submit your code a nd your Cl a ss Di a gr a m 26
  6. CSC 305 Individual Software Design and Development Javier Gonzalez-Sanchez, Ph.D.

    [email protected] Fall 2025 Copyright. These slides can only be used as study material for the class CSC305 at Cal Poly. They cannot be distributed or used for another purpose.