mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-27 07:44:20 +02:00
replaceAll takes a regex, escape newline to replace it with <br>
This fixes the download box displaying only one line for all versions and their fix descriptsion out of ripme.json.
This commit is contained in:
@@ -131,10 +131,10 @@ public class UpdateUtils {
|
|||||||
JEditorPane changeListPane = new JEditorPane("text/html", String.format(
|
JEditorPane changeListPane = new JEditorPane("text/html", String.format(
|
||||||
"<html><font color=\"green\">New version (%s) is available!</font>" + "<br><br>Recent changes: %s"
|
"<html><font color=\"green\">New version (%s) is available!</font>" + "<br><br>Recent changes: %s"
|
||||||
+ "<br><br>Do you want to download and run the newest version?</html>",
|
+ "<br><br>Do you want to download and run the newest version?</html>",
|
||||||
latestVersion, changeList.replaceAll("\n", "<br><br>")));
|
latestVersion, changeList.replaceAll("\\n", "<br><br>")));
|
||||||
changeListPane.setEditable(false);
|
changeListPane.setEditable(false);
|
||||||
JScrollPane changeListScrollPane = new JScrollPane(changeListPane);
|
JScrollPane changeListScrollPane = new JScrollPane(changeListPane);
|
||||||
changeListScrollPane.setPreferredSize(new Dimension(250, 200));
|
changeListScrollPane.setPreferredSize(new Dimension(300, 300));
|
||||||
int result = JOptionPane.showConfirmDialog(null, changeListScrollPane, "RipMe Updater",
|
int result = JOptionPane.showConfirmDialog(null, changeListScrollPane, "RipMe Updater",
|
||||||
JOptionPane.YES_NO_OPTION);
|
JOptionPane.YES_NO_OPTION);
|
||||||
if (result != JOptionPane.YES_OPTION) {
|
if (result != JOptionPane.YES_OPTION) {
|
||||||
|
Reference in New Issue
Block a user