Java II Chapter 13 & 14
A label's preferred size is determined only by calling the setPreferredSize method
False
A read-only text field uses the JReadOnlyTectField component
False
By default the scroll bars are always displayed in a JList compnent.
False
In the following code the setPreferredSize method sets the size of the text, "Have a good day". label = new Jlabel("Have a good day", Swing Constants.CENTER); label.setPreferredSize(new Dimension(400,200));
False
The applet class requires that you write a constructor to create an object of the class.
False
Whenever you need a component of any type to be painted, call the paint method.
False
An applet does not have to be on a Web server in oreder to be executed.
True
Both AWT classes and Swing classes ultimately inherit from the Component class
True
For all Swing components EXCEPT JApplet and JFrame, you should override the paint Component method instead of the paint method
True
HTML describes the content and layout of a Web page, and creates links to other files and Web pages, but does not have sophisticated abilities such as performing math calculations and interacting with the user
True
Some browsers do not directly support the Sing classes of applets
True
The brower creates an instance of the applet class automatically.
True
The delay parameter in the Timer constructor is the amount of time between action events, measured in milliseconds.
True
The following getAudioClip() method returens an object that will load the sound file and assign the location of that file to clip which can then be used to call methods that may play the sound file one or more times: Audioclip clip = getAudioClip(getDocumentBase(), "mysound.wav");
True
The play method will load and play a sound file once, then release it for garbage collection. The getAudioClip method will load the sound file and may assign the location of the sound file to a variable so it may be invoked many times
True
When a JList component is added to a JScrollPane object, a border will automatically appear around the list
True
When creating images, the argument passes to the image parameter in the JLabel contructor can be an ImageIcon object, or any object that implements the Icon interface.
True
When using a slider, by default, tick marks are not displayed, and setting their spacing does not cause them to be displayed
True
You can create a label with an image, or with both an image and text.
True
When you write a change listener class method for a slider, it must implement the ChangeListener interface which is in the javax.swing.event package
Ture