Friday, May 6, 2011

chapter 7

Which of the following is not a rule for the FlowLayout manager?
==All of the above are rules for the FlowLayout manager

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.
==java -splash:Logo.jpg MyApplication

When an application uses many components, instead of deriving just one class from the JFrame class, a better approach is to
==Encapsulate smaller groups of related components and their event listeners into their own classes

When this is the argument passed to the JFrame class's setDefaultCloseOperation() method, the application is hidden, but not closed.
==B. JFrame. HIDE_ON_CLOSE**

In Java, the ability to display splash screens was introduced in Java 6.
==true

When an application uses many components, rather than deriving just one class from the JFrame class, it is often better to encapsulate smaller groups of related components and their event listeners into their own class. A commonly used technique to do this is
==To derive a class from the JPanel class to contain other components and their related code

If button1 is a JButton object, which of the following statements will make its background blue
==button1.setBackground(Color.blue);

To click the JRadioButton referenced by radio, write the following code.
==radio.doClick();

The FlowLayout manager does not allow the programmer to align components.
==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.
==true

No comments:

Post a Comment