Added popup on new Agenda
This commit is contained in:
+7
-3
@@ -48,9 +48,13 @@ public class MenuBar extends JMenuBar {
|
|||||||
JMenuItem newAgenda = new JMenuItem("New Agenda");
|
JMenuItem newAgenda = new JMenuItem("New Agenda");
|
||||||
newAgenda.addActionListener(new ActionListener() {
|
newAgenda.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
Agenda a = new Agenda();
|
|
||||||
w.setAgenda(a);
|
if(JOptionPane.showConfirmDialog(null, "Are you sure you want to create a new agenda?", "New Agenda", JOptionPane.YES_NO_OPTION) == JOptionPane.OK_OPTION)
|
||||||
Window.updatePanel("table");
|
{
|
||||||
|
Agenda a = new Agenda();
|
||||||
|
w.setAgenda(a);
|
||||||
|
Window.updatePanel("table");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user