Problem

Provide a complete program that displays this Hello World message:Note these label charact...

Provide a complete program that displays this Hello World message:

Note these label characteristics: (1) raised bevel border, (2) italics, (3) large font size (30 points), (4) tool tip that says “Life is Great!” Use this program skeleton as a starting point:

import javax.swing.*;import java.awt.*;//**********************************************************public class BigHello extends JFrame{public BigHello(){JLabel label = <instantiation> ;setSize(200, <height> );setLayout(new FlowLayout());add(label);<3-statement code fragment>setVisible(true);} // end constructor//**********************************************************public static void main(String[] args){BigHello hello = new BigHello();} // end main} // end BigHello class

To figure out how to do this, in Java’s API, look up the setFont, setBorder, and setToolTipText methods that JLabel inherits from JContainer. For the setFont argument, use JContainer’ s getFont to get the default font, and then alter it by using Font’s two-parameter deriveFont method in which the first parameter specif es an italic font style and the second parameter specifies a 30-point size. Use JContainer’ s setBorder method, and for its Border argument use the appropriate class method from the BorderFactory class.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 16
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT