forked from gihanjayatilaka/Motify
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestingGUI.java
More file actions
44 lines (33 loc) · 1.32 KB
/
TestingGUI.java
File metadata and controls
44 lines (33 loc) · 1.32 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
import java.awt.*;
import java.util.ArrayList;
import java.awt.event.*;
import javax.swing.*;
public class TestingGUI implements ActionListener{
TestingGUI() throws Exception{
ArrayList<Reminder> reminders=ReaderOne.readURL("https://feels.pdn.ac.lk/calendar/export_execute.php?userid=2385&authtoken=dce15e9ca0de8df24e32a9da4cb9abdda757298b&preset_what=all&preset_time=monthnow");
JFrame mainFrame=new JFrame();
mainFrame.setBounds(400, 400, 400, 400);
mainFrame.setVisible(true);
ArrayFileHandling.saveArray(reminders);
ArrayList<Reminder> arrayAfterReading=ArrayFileHandling.readArray();
//reminders=ArrayHandling.remainingReminders(reminders);
for(int x=0;x<arrayAfterReading.size();x++){
JButton button=new JButton(""+arrayAfterReading.get(x).UID+" : "+arrayAfterReading.get(x).summary);
button.setBounds(50, 50*x, 400, 50);
button.setEnabled(true);
button.addActionListener(this);
mainFrame.getContentPane().add(button);
}
}
public static void main(String args[]) throws Exception{
TestingGUI x=new TestingGUI();
}
@Override
public void actionPerformed(ActionEvent e) {
JFrame thisActivity=new JFrame(e.getSource().toString());
thisActivity.setBounds(400,400,400,400);
JTextField textOnActivity=new JTextField();
textOnActivity.setText("");
thisActivity.setVisible(true);
}
}