import javax.swing.*;
import java.awt.*;
public class JFrame4
{
public static void main(String[] args)
{
final int FRAME_WIDTH = 250;
final int FRAME_HEIGHT = 100;
________________________
JFrame aFrame = new JFrame("Fourth frame");
aFrame.setSize(FRAME_WIDTH, FRAME_HEIGHT); aFrame.setVisible(true);
aFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JLabel greeting = new JLabel("Good day");
________________________
aFrame.add(greeting);
}
}
In the first blank line provided, write the statement to create a Font object named myLook with a typeface of Times New Roman, italic, and 30-point size. In the second blank line, create the statement to apply myLook to the greeting JLabel.
Correct Answer:
Verified
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q57: Match each term with the correct statement
Q57: How do you change the text of
Q58: Match each term with the correct statement
Q59: What type of method must you implement
Q60: Match each term with the correct statement
Q62: Assume you have declared a JFrame named
Q63: import javax.swing.*;
public class JFrameLabel
{
public static void main(String[]
Q65: import javax.swing.*;
public class JFrameLook
{
public static void main(String[]
Q67: Write the statement to create a layout
Q78: Write the statement to clear out a
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents