panel.add(button1) ĭ) use the statement, Panel panel = new Panel(bGroup) C) add each button to panel one at a time, e.g. If you want to add the buttons to the panel:Ĭ) add each button to panel one at a time, e.g. The variable bGroup references a ButtonGroup object, which contains several button components. The GridLayout manager does not have this restrictionĭ) You can nest panels inside the cells, and add other components to the panels D) You can nest panels inside the cells, and add other components to the panels The minimize button, maximize button, and close button on a window are sometimes referred to as:ĭ) decorations D) decorations The variable panel references a JPanel object. To put two or more components in a cell, do this:Ī) Resize the cells so they can hold moreī) Resize the components to fit in the cellĬ) The statement is false. TimeOfDayButtonGroup = new ButtonGroup() ĭ) 2 D) 2 If button1 is a JButton object, which of the following statements will make its background blue?ĭ) button1.makeBackground(Color.BLUE) B) tBackground(Color.BLUE) If panel references a JPanel object, which of the following statements adds the GridLayout to it?ī) tLayout(new (GridLayout(2,3)) ĭ) panel.attachLayout(GridLayout(2,3)) B) tLayout(new (GridLayout(2,3)) In a Swing application, you create a frame object from the:ĭ) JFrame D) JFrame In Swing, labels are created with this class:ĭ) Java Fundamental Core C) Java Foundation Classes One of the small dots that make up a screen display is known as what?ĭ) point A) pixel Programs that operate in a GUI environment must be:ĭ) layout managers B) event driven The GridLayout manager limits each cell to only one component. To determine whether the check box has been selected, use the following code:Ī) if (checkBox.doClick()) Because these components rely on the appearance and behavior of the underlying operating system components, there is little that can be done by the programmer to change their properties.ĭ) Container B) AWT Event listeners must:ī) exit the application once it has handled the eventĭ) implement an interface D) implement an interface How many radio buttons can be selected at the same time as the result of the following code? To click the radio button in code, use the following statement:ĭ) Click(radio, true) C) radio.doClick() Assume that the variable checkbox references a JCheckBox object. True/False False _ is a library of classes that do not replace _, but provide an improved alternative for creating GUI applications.ĭ) JFC, AWT C) Swing, AWT Assume that radio references a JRadioButton object. True/False False When a splash screen is displayed, the application does not load and execute until the user clicks the splash screen image with the mouse. You must use the statement import java.swing.* in order to use the ItemListener interface.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |