-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
67 lines (54 loc) · 2.46 KB
/
Main.java
File metadata and controls
67 lines (54 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package ru.karproj.snaker;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Main {
public static void main(String[] args) {
JFrame frame = new JFrame("Medicine Service");
Container c = frame.getContentPane();
c.setBackground(Color.CYAN);
frame.setSize(600,400);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLocationRelativeTo(null);
frame.setLayout(new GridBagLayout());
frame.setResizable(false);
Font f1 = new Font("TimesRoman", Font.BOLD, 20);
JButton m = new JButton("Қазақ тілі");
m.setBackground(Color.PINK);
frame.add(m);
m.setFont(f1);
m.setCursor(new Cursor(Cursor.HAND_CURSOR));
m.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent actionEvent) {
KazakhLanguage kz = new KazakhLanguage();
kz.setVisible(true);
}
});
JButton m2 = new JButton("Русский язык");
m2.setBackground(Color.MAGENTA);
frame.add(m2);
m2.setFont(f1);
m2.setCursor(new Cursor(Cursor.HAND_CURSOR));
m2.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent actionEvent) {
RussianLanguage rl = new RussianLanguage();
rl.setVisible(true);
}
});
JButton m3 = new JButton("English Language");
m3.setBackground(Color.CYAN);
frame.add(m3);
m3.setFont(f1);
m3.setCursor(new Cursor(Cursor.HAND_CURSOR));
m3.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent actionEvent) {
EnglishLanguage el = new EnglishLanguage();
el.setVisible(true);
}
});
frame.setVisible(true);
}
}