csc2700proj03

csc2700proj03 - Two Flags CSc 2700: Programming Project # 3...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Two Flags CSc 2700: Programming Project # 3 Drawing On Panels and Displaying Images Out: 10/15 Due: 10/26 by 11:59 PM Learning Objectives drawing shapes on a panel using colors Introduction Usually, drawing is done on a JPanel. To draw on a panel, we usually extend the JPanel class, and override the paintComponent(Graphics g) method. An advantage to this approach is that multiple instances of a panel can then be created and then added to other panels or to a frame with a speciFc layout. In this project you would be given very few parameters so you will have to experiment to give the Fnal GUI you create an excellent look and feel. OlympicFlag Create a class called Olympic±lag that is a subclass of the JPanel class. This class should override the paintComponent method. The paintComponent method should draw the Olympic ²ag so that the distance from the blue to the red ring covers about three-Ffths of the width of the panel with one-Ffth of the width on the left of the blue ring and one-Ffth on the right of the red ring. In other words, you want to center those three rings as best as you can.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/06/2009 for the course CSC 2700 taught by Professor Duncan during the Spring '08 term at LSU.

Page1 / 4

csc2700proj03 - Two Flags CSc 2700: Programming Project # 3...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online