Questions from Starting Out With Java


Q: How do you store an image in a JLabel component? How

How do you store an image in a JLabel component? How do you store both an image and text in a JLabel component?

See Answer

Q: How do you store an image in a JButton component? How

How do you store an image in a JButton component? How do you store both an image and text in a JButton component?

See Answer

Q: What method do you use to store an image in an existing

What method do you use to store an image in an existing JLabel or JButton component?

See Answer

Q: How is an applet that is associated with a Web page executed

How is an applet that is associated with a Web page executed on a user’s system?

See Answer

Q: What tag causes a line break? What tag causes a paragraph

What tag causes a line break? What tag causes a paragraph break? What tag ­displays a horizontal rule?

See Answer

Q: Suppose you wanted to display the text “Click Hereâ€

Suppose you wanted to display the text “Click Here†as a link to the Web site http://java.sun.com. What statement would you write to create the text?

See Answer

Q: Write the first line of the definition for a Stereo class.

Write the first line of the definition for a Stereo class. The class should extend the SoundSystem class, and it should implement the CDplayable, TunerPlayable, and CassettePlayable interfaces.

See Answer

Q: Instead of JFrame, an applet class is extended from what class

Instead of JFrame, an applet class is extended from what class?

See Answer

Q: Instead of a constructor, an applet class uses what method?

Instead of a constructor, an applet class uses what method?

See Answer

Q: Why is there no need for a static main method to create

Why is there no need for a static main method to create an instance of an applet class?

See Answer