Skip to content

Commit

Permalink
fixed HTML tags in message dialog box
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamik423 committed Aug 30, 2023
1 parent 628d4bf commit 3a77801
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/de/paginagmbh/epubchecker/MessageGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void showError(String message) {
showError(message, windowTitle);
}
public void showError(String message, String title) {
JOptionPane.showMessageDialog(f, "<html><b>"+ title +"</b><br/><br/>" + message + "<br/><br/><html>", windowTitle, JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(f, "<html><b>"+ title +"</b><br/><br/>" + message.replace("\n", "<br/>") + "<br/><br/></html>", windowTitle, JOptionPane.ERROR_MESSAGE);
}


Expand All @@ -87,7 +87,7 @@ public void showMessage(String message) {
showMessage(message, windowTitle);
}
public void showMessage(String message, String title) {
JOptionPane.showMessageDialog(f, "<html><b>"+ title +"</b><br/><br/>" + message + "<br/><br/><html>", windowTitle, JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(f, "<html><b>"+ title +"</b><br/><br/>" + message.replace("\n", "<br/>") + "<br/><br/></html>", windowTitle, JOptionPane.INFORMATION_MESSAGE);
}


Expand All @@ -99,7 +99,7 @@ public int showQuestion(String message) {
}
public int showQuestion(String message, String title) {
Object[] options = {__("Start update"), __("Cancel")};
int n = JOptionPane.showOptionDialog(f, "<html><b>"+ title +"</b><br/><br/>" + message + "<br/><br/><html>", windowTitle, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);
int n = JOptionPane.showOptionDialog(f, "<html><b>"+ title +"</b><br/><br/>" + message.replace("\n", "<br/>") + "<br/><br/></html>", windowTitle, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);
return n;
}

Expand Down

0 comments on commit 3a77801

Please sign in to comment.