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
  • PrintPrint
Share this Page URL
Help

12. Getting GUI: A Very Graphic Story > Your first GUI: a button on a frame

Your first GUI: a button on a frame

image with no caption

Let’s see what happens when we run it:

%java SimpleGui1
image with no caption

Whoa! That’s a Really Big Button.

The button fills all the available space in the frame. Later we’ll learn to control where (and how big) the button is on the frame.

There are no Dumb Questions

Q:

Q: Will a button look like a Windows button when you run on Windows?

A:

A: If you want it to. You can choose from a few “look and feels”—classes in the core library that control what the interface looks like. In most cases you can choose between at least two different looks: the standard Java look and feel, also known as Metal , and the native look and feel for your platform. The Mac OS X screens in this book use either the OS X Aqua look and feel, or the Metal look and feel.


  

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


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint