/** * Program starts here. * * @param args */ public static void main(String[] args) { path = new File("schedule_data.ser"); config = new Config(); // Code to open the config file. try { recallConfigFile(); if (getSchedule() != (null)) { cal = new CalendarGUI(getSchedule()); // config.setVisible(true); cal.setVisible(true); } else { config.setVisible(true); } } catch (Exception exception) { exception.printStackTrace(); } }
/** * Changes visible of calendar. * * <p>SWAP 1, TEAM 6 * * <p>SMELL: Middle Man - this method is only about changing an aspect of another object. * Refactoring this would remove an unnecessary layer of indirection. */ public static void toggleCalendar() { cal.setVisible(!cal.isVisible()); }