public BrowserLauncherTestApp() { super(); try { bundle = ResourceBundle.getBundle(debugResources); logger = initDebugLogging(); loggingLevelTxtFld.setText(logger.getLevelText()); super.setTitle(bundle.getString("label.app.title")); populateDebugInfo(bundle, debugTextArea); launcher = new BrowserLauncher(logger, new TestAppErrorHandler(debugTextArea)); ComboBoxModel cbModel = new DefaultComboBoxModel(launcher.getBrowserList().toArray()); browserBox.setModel(cbModel); windowPolicyCBox.setSelected(launcher.getNewWindowPolicy()); jbInit(); } catch (Exception ex) { ex.printStackTrace(); } }
private void loggingLevelBttn_actionPerformed(ActionEvent e) { String[] levels = logger.getLevelOptions(); int levelIndex = logger.getLevel(); String level = (String) JOptionPane.showInputDialog( this, bundle.getString("logging.level.select.message"), bundle.getString("logging.level.select.title"), JOptionPane.QUESTION_MESSAGE, null, levels, levels[levelIndex]); if (level != null && level.length() > 0) { levelIndex = -1; for (int idx = 0, max = levels.length; idx < max && levelIndex == -1; idx++) { if (level.equals(levels[idx])) { levelIndex = idx; } } logger.setLevel(levelIndex); loggingLevelTxtFld.setText(logger.getLevelText()); } }