![]() |
The Java Developers Almanac 1.4 |
|
e819. Highlighting Buttons in a JToolbar Container While Under the CursorBy default, a button in a toolbar does not change its appearance when the cursor is over the button. However, if the toolbar is in rollover mode, the buttons will highlight while under a cursor. // Create a horizontal toolbar
JToolBar toolbar = new JToolBar();
// Get current rollover mode
boolean b = toolbar.isRollover();
// Enable rollover mode
toolbar.setRollover(true);
e817. Determining When a Floatable JToolBar Container Changes Orientation e818. Preventing a JToolbar Container from Floating © 2002 Addison-Wesley. |