WindowTricks

WindowTricks - Graphic Interface Programming II Some First...

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

View Full Document Right Arrow Icon
IT Uppsala universitet Graphic Interface Programming II Some First Graphics Tricks
Background image of page 1

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

View Full DocumentRight Arrow Icon
UU/IT 3/25/10 | #2 @ UU/IT Advanced Graphics NOTE! Some advanced Graphics features are not available on all platforms One such feature is transparency Some kinds may still work! It is necessary to test for this property when we implement more fancy features
Background image of page 2
UU/IT 3/25/10 | #3 @ UU/IT From Simple to… Need to know more about the basic drawing mechanisms in Swing From the Basics To the Skies In small small steps
Background image of page 3

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

View Full DocumentRight Arrow Icon
UU/IT 3/25/10 | #4 @ UU/IT Window drawing paintComponent() draws everything Decorations Borders Title Bars setUndecorated(true); By default Frames are decorated If undecorated the titlebar disappears! Moving the window becomes difficult…
Background image of page 4
UU/IT 3/25/10 | #5 @ UU/IT Graphics(2D) Most of the time Swing uses 2D graphics (even when we have a Graphics g component) We never create a Graphics object We get it in the call to paintComponent() We manipulate the given Graphics object in the method
Background image of page 5

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

View Full DocumentRight Arrow Icon
UU/IT 3/25/10 | #6 @ UU/IT 2D Rendering 1. Get a Graphics (Graphics2D) object 2. Set attributes on the Graphics object 3. Draw graphics primitives with the Graphics object 4. Repeat 2 and 3 until satisfied
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 19

WindowTricks - Graphic Interface Programming II Some First...

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

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