![]() When a button is disabled, the look and feel automatically generates the button's disabled appearance. For example, Alt-M would click the Middle button in ButtonDemo. In most look and feels, the user can click a button by pressing the Alt key and the mnemonic. The underlined letter in each button's text shows the mnemonic the keyboard alternative for each button. ![]() In ButtonDemo, each button has its text in a different place, relative to its image. It enables the middle button and the left button, and disables itself.Īs the ButtonDemo example shows, a Swing button can display both text and an image. It disables the middle button (and itself, since it is no longer useful) and enables the right button. ![]() Alternatively, to compile and run the example yourself, consult the example index. Java™ Web Start ( download JDK 7 or later). Click the Launch button to run the Button Demo using. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |