提交 e9f31b4f 编写于 作者: D dmarkov

8016534: javax/swing/text/View/8014863/bug8014863.java failed

Reviewed-by: alexp, alexsch
上级 fb24d89d
......@@ -136,9 +136,12 @@ public class bug8014863 {
"qqqq <em>pp</em> qqqq <em>pp</em> qqqq <em>pp</em> qqqq <em>pp" +
"</em> qqqq <em>pp</em> qqqq <em>pp</em> qqqq <em>pp</em> qqqq</p>");
editorPane.setCaretPosition(1);
// An actual font size depends on OS and might be differnet on various OSs.
// It is necessary to calculate the width to meet the expected number of lines.
int width = SwingUtilities.computeStringWidth(editorPane.getFontMetrics(editorPane.getFont()),
"qqqq pp qqqq pp qqqq pp qqqqqqqq");
frame.add(editorPane);
frame.setSize(200, 200);
frame.setSize(width, 200);
frame.setVisible(true);
}
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册