public static void showErrorMessage(String title, String message) { int ret = JOptionPane.showOptionDialog( null, "<html><body>" + "<div style=\"font-weight: bold; padding-bottom: 10px;\">" + message + "</div>" + "<div>" + "Please check the protege.log file in the logs directory for details." + "</div>" + "</body></html>", title, JOptionPane.OK_CANCEL_OPTION, JOptionPane.ERROR_MESSAGE, null, new Object[]{VIEW_LOG, OK}, OK ); if(ret != 0) { return; } FileUtils.showLogFile(); } }
JButton showLogFile = new JButton("Show log file"); showLogFile.setToolTipText("Show the log file in the system file browser"); showLogFile.addActionListener(e -> FileUtils.showLogFile()); JButton preferencesButton = new JButton("Preferences"); preferencesButton.addActionListener(e -> showPreferences());