if (userEvents.length != startLength) writeEventsToFile(); endDialog();
if (userEvents.length != startLength) { Base.writeEventsToFile(userEvents); } endDialog();
	public ShowEvents(MWnd parent) {		super(parent, "Eigene Events anzeigen", true);		Point parloc = parent.getLocation();		setBounds(parloc.x + 40, parloc.y + 40,550,250);		this.getRootPane().setLayout(new BorderLayout());		this.parent = parent;		// Tabelle (und ScrollPane) erzeugen		table = new JTable();		JScrollPane scrollp = new JScrollPane(table,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);		JPanel tp = new JPanel(new GridLayout(1,1));				// Tabellen-Eigenschaften		table.setName("userevents");		table.setToolTipText("Events-Tabelle (eigene Events)");		table.addMouseListener(new MouseL(table, this));		table.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);		table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);		// Tabelle füllen		userEvents = Base.parseUserEvents(FileIO.readFile(Define.getUserEADFileName(), false));		startLength = userEvents.length;		fillTable();		    		tp.add(scrollp);		this.getRootPane().add(tp, BorderLayout.CENTER);		//Ende-Button-Panel		JPanel button_panel = new JPanel(new FlowLayout());		del_button.addActionListener(this);		if (table.getRowCount() == 0)		    del_button.setEnabled(false);		button_panel.add(del_button);				JButton close_button = new JButton("Schlie\u00DFen");		close_button.addActionListener(this);		button_panel.add(close_button);				this.getRootPane().add(button_panel, BorderLayout.SOUTH);				//Window-Listener		addWindowListener(			new WindowAdapter() {				public void windowClosing(WindowEvent event)				{				    if (userEvents.length != startLength)					    writeEventsToFile();				    endDialog();				}			}		);	}