Below is a really simple java program which will show text on JFrame which I have created, hope you will enjoy reading it. What this program does is super simple, it creates an instance of the JFrame object and show text on that frame. The code is as follow :
import javax.swing.*;
import java.awt.*;
public class JFont extends JFrame {
Font fontFormat = new Font("Arial", Font.BOLD, 19);
String hello = "Hello World!";
public void paint(Graphics font) {
super.paint(font);
font.setFont(fontFormat);
font.drawString(hello, 23, 100);
}
public static void main(String[] args) {
JFont frame = new JFont();
frame.setSize(163, 163);
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
If you run the program, you will see below outcome :

Next Page :
Javascript replace method reviewJavascript replace method review
How to use Java Scanner ClassThis article will show you how to use Java Scanner Class with simple Java code.
The if…else statement in Java program‘The if…else statement in Java program’ article will show you an example to use the statement.
Java Scanner ClassJava Scanner class tutorial will show you how to create an instance of the scanner class and read in the input from the user then print out the sum of those inputs.
Creating and Using Interfaces in Java ProgramCreating and Using Interfaces in Java Program will show you how to write simple java program using Interfaces.
Create a simple Java methodAn article about how to create a simple Java method.
