ICS4U1 Course Contents — Links to Lessons
Unit 1: Consolidating Java (from grade 11)
Grade 11 Notes
Unit 2: Errors, File I/O
Errors (exceptions) are handled using try-catch. Most of the examples relate to input/output since most I/O operations throw exceptions and require an understanding of try-catch. Thus these two topics are tightly integrated. The minor topics of constants and enums are not connected to errors or file I/O in any way.
Unit 3: Objects
Unit 4: Graphics
Summary of Swing/AWT Events - a good reference (just needs a bit more fixing up)
5. Subclassing JPanel so that you can draw on it.
(also how to save your drawing to a PNG file)
Graphics2D: antialiasing and stroke width
See "Rotating an object" for an example of a timer
Example of animation WITHOUT timer: GraphicsMain.java and Shape.java
7. All about resizing JFrames and JPanels
- making JFrame full screen
- setting an exact JPanel size
- resizable graphics (TicTacToe)
- example of how to force resizing to always make a square window.
This is a brief summary of the main topics. There are more details in each link
ColourRainbow.java is here. It's handy if you want rainbow colours.