Chapter 18 - Code Snippets ========================== p.587, Tip: try { UIManager.setLookAndFeel(new com.sun.java.swing.plaf.motif.MotifLookAndFeel()); } catch (Exception exemp){ exemp.printStackTrace(); } --------------------------------------------------------------------------------- p. 608: Step 1. ... Add the following import statement to the beginning list: import javax.swing.table.*; Step 2. ... add the following code after that method: TableColumn firstNameColumn = empTable.getColumn("First Name"); firstNameColumn.setMinWidth(100); firstNameColumn.setMaxWidth(100); ------------------------------------------------------------------------------------------------------------------- p. 613-614, Steps 9-10: 9. Add the following import statements ... import javax.swing.*; import javax.swing.JOptionPane; 10. Replace the default public DemoJOptionBean( ) constructor with the following code: public DemoJOptionBean(JPanel inPanel) { JOptionPane.showMessageDialog( inPanel, "This is a modal dialog box", "Sample Information Dialog", JOptionPane.INFORMATION_MESSAGE); } ------------------------------------------------------------------------------------------------------------------- p. 620: Step 19. Modify the line of code in the new position to look like the following. (Note that you will be deleting the word “private” and adding a parameter to the constructor call.) DemoJOptionBean demoOptionPane = new DemoJOptionBean(mainPanel); ------------------------------------------------------------------------------------------------------------------