boolean nothingIsEnabled = true; for(Iterator i = m_dset.getWordsList().iterator(); i.hasNext();) { Word w = (Word)i.next(); if(w.getEnabled()) { nothingIsEnabled = false; break; } } if(nothingIsEnabled) { JOptionPane.showMessageDialog(this, "Please enable some words first.", "Message", JOptionPane.INFORMATION_MESSAGE); return; }
	private void beginSession()	{		if(m_editors.size() > 0)		{			JOptionPane.showMessageDialog(this, "Please close all editors first.",			"Message", JOptionPane.INFORMATION_MESSAGE);			return;		}		DialogSession ds = new DialogSession(this, true);		int mode;		switch(m_comboMode.getSelectedIndex())		{			case 0: mode = DialogSession.TEACH_MODE; break;			case 1: mode = DialogSession.TEST_MODE; break;			default: return;		}		ds.prepareSession(mode, m_comboDirection.getSelectedIndex(), m_dset);		ds.show();	}