import javax swing JFrame import javax swing JMenuBar import javax swi

 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
import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.ImageIcon;
public class Test
{
publick static void main(String[] args)
{
JFrame jf = new JFrame();
jf.setTitle("Laba");
jf.setSize(500,500);
jf.setDefaultCloseOperation(JFrame.Exit_On_Close);
jf.setVisible(true);
JMenuBar jmb = new JMenuBar();
jf.setJMenuBar(jmb);
JMenu file = new JMenu("Alarm");
jmb.add(alarm);
JMenuItem open = new JMenuItem("Open Alarm...");
file.add(Open);
}
}