Chapter 9 - Code Snippets Change the look-and-feel of Swing class runtime. p. 314 You can change to CDE/Motif using the following code at the beginning of the main() method (before any constructors): try { UIManager.setLookAndFeel(new com.sun.java.swing.plaf.motif.MotifLookAndFeel()); } catch (Exception e) { } Substitute "windows .WindowsLookAndFeel" for "motif.MotifLookAndFeel" if you want the runtime to emulate Windows. Use "metal.MetalLookAndFeel" if you want to specify the Metal look, but this is the default. You can right click in the UI Designer and select the look of that window during design time. --------------------------------------------------------------------- Adding to the Component Toolbar p. 351 Phase II - Test JOptionPane Step 10. Replace the blank line in the new method with the following: mainOptionPane.showMessageDialog( this, "This is a dialog box", "Sample Dialog", JOptionPane.INFORMATION_MESSAGE); --------------------------------------------------------------------- Phase V - Test the Java Bean p. 356 Step 2 Define two more events for the exit button. Doubleclick the current name (value) for each and enter the code below for the method that is created in the Source Viewer: Event Code MouseEntered exitButton.setBorderPainted(true); MouseExited exitButton.setBorderPainted(false); ---------------------------------------------------------------------