Sams Teach Yourself Java™ in 24 Hours (Covering Java 7 and Android)
ptg7068951 172 HOUR 13:Building a Simple User Interface The size of the frame can be established by calling its setSize()method ...
ptg7068951 Using Components 173 The following statement sets Nimbus as the look and feel: UIManager.setLookAndFeel( “com.sun.jav ...
ptg7068951 174 HOUR 13:Building a Simple User Interface The only thing that SalutonFramedisplays is a title—the Esperanto greeti ...
ptg7068951 Using Components 175 When you add components to a container, you do not specify the place in the container where the ...
ptg7068951 176 HOUR 13:Building a Simple User Interface 24: “com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel” 25: ); 26: } catc ...
ptg7068951 Using Components 177 The pageLabellabel is set up with the text “Web page address:” and a JLabel.RIGHTargument. This ...
ptg7068951 178 HOUR 13:Building a Simple User Interface You can present a JCheckBoxsinglyor as part of a group. In a group of ch ...
ptg7068951 Using Components 179 This example creates a single JComboBoxcomponent that provides six choices from which the user c ...
ptg7068951 180 HOUR 13:Building a Simple User Interface You can specify a string in the JTextArea()constructorto be displayed in ...
ptg7068951 Creating Your Own Component 181 The first step in creating your own user interface component is to decide the existin ...
ptg7068951 182 HOUR 13:Building a Simple User Interface 43: monthName = “June”; 44: break; 45: case (7): 46: monthName = “July”; ...
ptg7068951 Creating Your Own Component 183 . Line 11—The timelabel is added to the clock panel by calling the panel’s add()metho ...
ptg7068951 184 HOUR 13:Building a Simple User Interface Summary Users have come to expect a point-and-click, visual environment ...
ptg7068951 Workshop 185 Q&A Q. How are components arranged if I don’t assign a layout manager to a container? A. In a simple ...
ptg7068951 186 HOUR 13:Building a Simple User Interface Quiz Which user component is used as a container to hold other componen ...
ptg7068951 WHAT YOU’LL LEARN IN THIS HOUR: .Creating a layout manager .Assigning a layout manager to a container .Using panels t ...
ptg7068951 188 HOUR 14: Laying Out a User Interface Under FlowLayout, components are dropped onto an area in the same way words ...
ptg7068951 Using Layout Managers 189 31: private voidsetLookAndFeel() { 32: try { 33: UIManager.setLookAndFeel( 34: “com.sun.jav ...
ptg7068951 190 HOUR 14: Laying Out a User Interface GridLayout grid = new GridLayout(2, 3); setLayout(grid); Figure 14.2 shows w ...
ptg7068951 Using Layout Managers 191 TheBoxLayoutManager Another handy layoutmanager, BoxLayoutin the javax.swingpackage, makes ...
«
5
6
7
8
9
10
11
12
13
14
»
Free download pdf