Examlex

Solved

Import Javax.swing.*; Import Java.awt.*;

question 15

Essay

import javax.swing.*;
import java.awt.*;
public class JDemoFont extends JFrame
{
Font bigFont = new Font("Serif", Font.ITALIC, 48);
String hello = "Hello";
public void paint(Graphics brush)
{
super.paint(brush);
brush.setFont(bigFont);
brush.drawString(hello, 10, 100);
}
public static void main(String[] args)
{
JDemoFont frame = new JDemoFont();
frame.setSize(180, 150);
frame.setVisible(true);
}
}
The above code shows an application that uses the setFont() method with a Graphics object named brush. Describe what will occur when the two shaded lines of code are executed.


Definitions:

Sovereign Nations

Refers to countries that operate as independent and autonomous states with the right to govern themselves without external interference.

Ross Perot

An American business magnate and political figure known for his independent presidential runs in 1992 and 1996, focusing on fiscal responsibility and political reform.

Presidential Election

The electoral process in which citizens or electors select a candidate to serve as the President of a country.

World Policeman

A colloquial term sometimes used to describe a nation (often the United States) taking an active role in enforcing international norms and peace.

Related Questions