Building on Your AIX Investment: Moving Forward with IBM eServer pSeries in an On Demand World (MaxFacts Guidebook series)

   

Core Java™ 2: Volume I - Fundamentals

By Cay S. Horstmann, Gary Cornell

Table of Contents

  • INTRODUCTION TO SWING

  • CREATING A FRAME

  • FRAME POSITIONING

  • DISPLAYING INFORMATION IN A PANEL

  • 2D SHAPES

  • COLORS

  • TEXT AND FONTS

  • 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 will 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 you a useful, valuable repertoire of skills that we will put to good use in the following chapters to write interesting programs.

The next two chapters show you how to process events such as keystrokes and mouse clicks, and how to add interface elements, such as menus and buttons, to your applications. When you finish these three chapters, you will know the essentials for writing stand-alone graphical applications. Chapter 10 shows how to program applets that use these features and are embedded in Web pages. For more sophisticated graphics programming techniques, we refer you to Volume 2.


       
    Top
     

    Категории