O'Reilly logo

Core Java™, Volume I–Fundamentals, Eighth Edition by Gary Cornell, Cay S. Horstmann

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Graphics Programming

INTRODUCING SWING

CREATING A FRAME

POSITIONING A FRAME

DISPLAYING INFORMATION IN A COMPONENT

WORKING WITH 2D SHAPES

USING COLOR

USING SPECIAL FONTS FOR TEXT

DISPLAYING IMAGES

To this point, you have seen only how to write programs that take input from the keyboard, fuss with it, and then display the results on a console screen. This is not what most users want now. Modern programs don’t work this way and neither do web pages. This chapter starts you on the road to writing Java programs that use a graphical user interface (GUI). In particular, you learn how to write programs that size and locate windows on the screen, display text with multiple fonts in a window, display images, and so on. This gives ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required