Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 7. Graphics Programming > Positioning a Frame

Positioning a Frame

The JFrame class itself has only a few methods for changing how frames look. Of course, through the magic of inheritance, most of the methods for working with the size and position of a frame come from the various superclasses of JFrame. Here are some of the most important methods:

  • The setLocation and setBounds methods for setting the position of the frame

  • The setIconImage method, which tells the windowing system which icon to display in the title bar, task switcher window, and so on

  • The setTitle method for changing the text in the title bar

  • The setResizable method, which takes a boolean to determine if a frame will be resizeable by the user


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial