String priorPage = null; for (Iterator iter = allDemos.keySet().iterator(); iter.hasNext();) { String s = (String) iter.next(); if (s.equals(lastDemoOpened)) { break; } priorPage = s; } if (priorPage == null) {  Iterator iter = allDemos.keySet().iterator(); while (iter.hasNext()) { priorPage = (String) iter.next(); } }  try { root.panel.loadPage((String) allDemos.get(priorPage)); lastDemoOpened = priorPage; } catch (Exception ex) { Uu.p(ex); }
navigateToPriorDemo();
        public void actionPerformed(ActionEvent e) {            String priorPage = null;            for (Iterator iter = allDemos.keySet().iterator(); iter.hasNext();) {                String s = (String) iter.next();                if (s.equals(lastDemoOpened)) {                    break;                }                priorPage = s;            }            if (priorPage == null) {                // go to last page                Iterator iter = allDemos.keySet().iterator();                while (iter.hasNext()) {                    priorPage = (String) iter.next();                }            }            try {                root.panel.loadPage((String) allDemos.get(priorPage));                lastDemoOpened = priorPage;            } catch (Exception ex) {                Uu.p(ex);            }        }