-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathEnterPoint.java
executable file
·40 lines (36 loc) · 1.11 KB
/
EnterPoint.java
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
import jade.gui.TimeChooser;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Date;
import javax.swing.*;
public class EnterPoint extends JFrame{
private static final long serialVersionUID=1L;
private TimeChooser time_chooser=new TimeChooser(new Date());
public static void main(String[] args){
new EnterPoint();
}
/** */
public EnterPoint(){
super("JADE Example");
initComponents();
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setSize(100,100);
this.getContentPane().add(initComponents());
this.setVisible(true);
this.pack();
}
/** èíèöèàëèçàöèÿ âèçóàëüíûõ êîìïîíåíòîâ */
private JPanel initComponents(){
JPanel return_value=new JPanel();
return_value.setLayout(new BorderLayout());
JButton buttonShowTime=new JButton("show time");
return_value.add(buttonShowTime,BorderLayout.NORTH);
buttonShowTime.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
time_chooser.showEditTimeDlg(EnterPoint.this);
}
});
return return_value;
}
}