8365271: Improve Swing supports

Reviewed-by: tr, prr, rhalade, aivanov
This commit is contained in:
Prasanta Sadhukhan 2025-08-26 03:07:27 +00:00 committed by bchristi
parent 3b6ac2af9c
commit 97bd445841

View File

@ -466,12 +466,12 @@ public class BasicOptionPaneUI extends OptionPaneUI {
str = s.substring(index2 + "</html>".length());
s = s.substring(index1, index2 + + "</html>".length());
}
JLabel label;
label = new JLabel(s, JLabel.LEADING);
JLabel label = new JLabel();
if (Boolean.TRUE.equals(
this.optionPane.getClientProperty("html.disable"))) {
label.putClientProperty("html.disable", true);
}
label.setText(s);
label.setName("OptionPane.label");
configureMessageLabel(label);
addMessageComponents(container, cons, label, maxll, true);