
1.7K Training / Learning / Certification.165.3K Java EE (Java Enterprise Edition).7.9K Oracle Database Express Edition (XE).3.8K Java and JavaScript in the Database.What is the fully-qualified name of the PINE enum constant?ġ.An instance of a class does not have to exist in order for values to be stored in a class's static fields.
#Flowlayout not defned code
You would use this command at the operating system command line to execute the code in the MyApplication class and display the graphic image Logo.jpg as a splash screen.ġ.A GUI program automatically stops executing when the end of the main method is reached.Ģ.A common technique for writing an event listener class is to.Ī.Declares array1 to be a reference to an array of double values.Ī.consists of elements, each of which is a reference to a String object.ī.is always implemented as a ragged array.Ģ1.What will be the result of executing the following code?Ī.is a way to locate a specific item in a larger collection of dataġ.To compare the contents of two arrays, you must compare the elements of the two arrays.Ģ.When an array of objects is declared, but not initialized.Ī.the key word static after the field nameī.the key word static after the access specifier and befo.ġ1.If the this variable is used to call a constructor,Ī.a compiler error will result, if it is not the first statement of the constructor. This is a graphic image that is displayed while an application loads into memory and starts up.Ĥ0. just go ahead and do it in one large classģ9. encapsulate smaller groups of related components and their event listeners into their own classesĭ. reconsider the design of the applicationĬ. break the application into several smaller applicationsī. When an application uses many components, instead of extending just one class from the JFrame class, a better approach is toĪ. The JPanel referenced by panel will have a compound border with the title "Title" displayed on it.ģ8. The JPanel referenced by panel will have a line border with the title "Title" displayed on it.ĭ. The JPanel referenced by panel will have an empty border with the title "Title" displayed on it.Ĭ. The JPanel referenced by panel will have an etched border with the title "Title" displayed on it.ī. tBorder(BorderFactory.createTitleBorder("Title")) Ī. What will be the result of executing the following statement? To determine whether the check box has been selected, use the following code.Ī. Assume that the variable checkbox references a JCheckBox object. greenCheckBox should not be a private memberģ6. The itemStateChanged method cannot be coded hereĭ. The button cannot be added to the content paneĬ. ColorCheckBoxWindow is not implementing the correct listenerī. Public void itemStateChanged(ItemEvent e)Ī. GreenCheckBox.addItemListener(new CheckBoxListener()) SetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) Private final int WINDOW_WIDTH = 300, WINDOW_HEIGHT = 100 Public class ColorCheckBoxWindow extends JFrame Why doesn't the following code compile correctly? Radio buttons implement ActionListener Check boxes implement ItemListenerģ5. Radio buttons are often grouped together and are mutually exclusive Check boxes are notĬ. Radio buttons are round and check boxes are square.ī. Which of the following statements is not true?Ī.

the components are added automatically by filling up the first column, then the second, etc.ģ4. you must add them starting with the lower, right cellĭ. you specify the cell with the row and column numbers in the add statementĬ. When adding components to a container that is governed by the GridLayout manager,ī.

the region is resized to fit the componentģ3. the component is stretched so it fills up the entire regionĭ. it results in a compile time error, if it is too largeĬ. the component retains its original sizeī. When a component is added to a region in the BorderLayout manager,Ī. All of these are rules for the FlowLayout managerģ2.

When there is no more room in a row, additional components are put on the next rowĭ. New components will be added in a row from left to rightĬ.

Multiple components can be added to a container that uses a FlowLayout managerī. Which of the following is not a rule for the FlowLayout manager?Ī.
