aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/net/cbaines/suca/CalendarApplet.java20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/net/cbaines/suca/CalendarApplet.java b/src/net/cbaines/suca/CalendarApplet.java
index f9de766..0357bbf 100644
--- a/src/net/cbaines/suca/CalendarApplet.java
+++ b/src/net/cbaines/suca/CalendarApplet.java
@@ -60,6 +60,11 @@ public class CalendarApplet extends JApplet {
private JPanel calendarCreationPanel;
+ private JPanel calendarCreationOptions;
+
+ // This is more of a development feature....?
+ private JTextArea calendarPreviewTextArea;
+
public void init() {
// Execute a job on the event-dispatching thread:
// creating this applet's GUI.
@@ -130,7 +135,9 @@ public class CalendarApplet extends JApplet {
stageTabbedPane.addTab("Calendar Fetch", csvFileFetchPanel);
// Calendar creation panel
- calendarCreationPanel = new JPanel();
+ calendarCreationPanel = new JPanel(new GridLayout(1, 2));
+
+ calendarCreationOptions = new JPanel();
JButton createCalendarButton = new JButton("Create Calendar");
createCalendarButton.addActionListener(new ActionListener() {
@@ -143,6 +150,7 @@ public class CalendarApplet extends JApplet {
try {
Calendar calendar = builder.build(new StringReader(calendarCSVString));
calendarICALString = calendar.toString();
+ calendarPreviewTextArea.setText(calendarICALString);
System.out.println(calendarICALString);
} catch (ParserException e) {
e.printStackTrace();
@@ -151,7 +159,7 @@ public class CalendarApplet extends JApplet {
}
}
});
- calendarCreationPanel.add(createCalendarButton);
+ calendarCreationOptions.add(createCalendarButton);
JButton saveCalendarButton = new JButton("Save Calendar");
saveCalendarButton.addActionListener(new ActionListener() {
@@ -174,7 +182,13 @@ public class CalendarApplet extends JApplet {
}
});
- calendarCreationPanel.add(saveCalendarButton);
+ calendarCreationOptions.add(saveCalendarButton);
+
+ calendarCreationPanel.add(calendarCreationOptions);
+
+ calendarPreviewTextArea = new JTextArea();
+
+ calendarCreationPanel.add(new JScrollPane(calendarPreviewTextArea));
stageTabbedPane.addTab("Calendar Creation", calendarCreationPanel);