You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
561 B

import javax.swing.*;
import java.awt.*;
class HelloWorldFrame extends JFrame {
HelloWorldFrame (String s) {
super(s);
}
public void paint(Graphics g) {
g.setFont(new Font("Serif", Font.ITALIC | Font.BOLD, 30));
g.drawString("Hello, XXI century World!", 20, 100);
}
public static void main(String[] args) {
JFrame f = new HelloWorldFrame("Здраствуй, мир XXI века!");
f.setSize(400, 150);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setVisible(true);
}
}