From 0315e4cd8a80b00a699a2cbdfe48dbfd25fffdbe Mon Sep 17 00:00:00 2001 From: Satyen Subramaniam Date: Thu, 11 Sep 2025 17:36:29 +0000 Subject: [PATCH 1/2] Backport 31a6de2e743923c92e976d5f5536120736d56029 --- .../swing/text/BoxView/BaselineTest.java | 182 ++++++++++++++++++ .../swing/text/GlyphView/bug4188841.java | 93 +++++++++ .../html/FormView/4473401/bug4473401.java | 90 +++++++++ .../text/html/FormView/4473401/frame1.html | 9 + .../text/html/FormView/4473401/frame2.html | 4 + .../html/FormView/4473401/frameresult.html | 5 + .../text/html/FormView/4473401/frameset.html | 11 ++ .../swing/text/html/FormView/bug4529702.java | 62 ++++++ .../html/FrameSetView/4890934/bug4890934.java | 91 +++++++++ .../html/FrameSetView/4890934/frame1.html | 8 + .../html/FrameSetView/4890934/frame2.html | 4 + .../FrameSetView/4890934/frameresult.html | 7 + .../html/FrameSetView/4890934/frameset.html | 11 ++ 13 files changed, 577 insertions(+) create mode 100644 test/jdk/javax/swing/text/BoxView/BaselineTest.java create mode 100644 test/jdk/javax/swing/text/GlyphView/bug4188841.java create mode 100644 test/jdk/javax/swing/text/html/FormView/4473401/bug4473401.java create mode 100644 test/jdk/javax/swing/text/html/FormView/4473401/frame1.html create mode 100644 test/jdk/javax/swing/text/html/FormView/4473401/frame2.html create mode 100644 test/jdk/javax/swing/text/html/FormView/4473401/frameresult.html create mode 100644 test/jdk/javax/swing/text/html/FormView/4473401/frameset.html create mode 100644 test/jdk/javax/swing/text/html/FormView/bug4529702.java create mode 100644 test/jdk/javax/swing/text/html/FrameSetView/4890934/bug4890934.java create mode 100644 test/jdk/javax/swing/text/html/FrameSetView/4890934/frame1.html create mode 100644 test/jdk/javax/swing/text/html/FrameSetView/4890934/frame2.html create mode 100644 test/jdk/javax/swing/text/html/FrameSetView/4890934/frameresult.html create mode 100644 test/jdk/javax/swing/text/html/FrameSetView/4890934/frameset.html diff --git a/test/jdk/javax/swing/text/BoxView/BaselineTest.java b/test/jdk/javax/swing/text/BoxView/BaselineTest.java new file mode 100644 index 00000000000..1af8d6cb286 --- /dev/null +++ b/test/jdk/javax/swing/text/BoxView/BaselineTest.java @@ -0,0 +1,182 @@ +/* + * Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @bug 4519537 4522866 + * @summary Tests that text and components in paragraph views line up at their baselines. + * @library /java/awt/regtesthelpers + * @build PassFailJFrame + * @run main/manual BaselineTest + */ + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.Graphics; +import java.awt.GridLayout; + +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JScrollPane; +import javax.swing.JTextPane; + +import javax.swing.text.ComponentView; +import javax.swing.text.BadLocationException; +import javax.swing.text.Document; +import javax.swing.text.Element; +import javax.swing.text.SimpleAttributeSet; +import javax.swing.text.StyleConstants; +import javax.swing.text.StyledEditorKit; +import javax.swing.text.View; +import javax.swing.text.ViewFactory; + +public class BaselineTest { + + static final String INSTRUCTIONS = """ + Test that components displayed in a JTextPane properly respect their vertical alignment. + There are two text panes, stacked vertically with similar content except the bottom components are taller. + The content consists of a leading and trailing text string, with pink coloured components between. + The text string content means the strings 'Default Size Text' and 'Large Size Text'. + Text content baseline is at the bottom of CAPITAL letters in the text. + Each pink component has a string displaying its alignment setting in the range 0.0 to 1.0 + NB: The position of the strings "align = 0.0" etc is not important, it is the component position that matters. + 0.0 means it should be aligned with its top at the text content baseline, + 1.0 means it should be aligned with its bottom at the text content baseline. + A value in between will be a proportional alignment, eg 0.5 is centered on the text content baseline + If the content displays as described, the test PASSES. + """; + + public static void main(String[] args) throws Exception { + PassFailJFrame.builder() + .title("BaselineTest Test Instructions") + .instructions(INSTRUCTIONS) + .columns(60) + .rows(12) + .testUI(BaselineTest::createUI) + .positionTestUIBottomRowCentered() + .build() + .awaitAndCheck(); + } + + public static JFrame createUI() { + JFrame frame = new JFrame("BaselineTest"); + frame.setLayout(new GridLayout(2, 1)); + + JTextPane prefPane = new JTextPane(); + initJTextPane(prefPane); + frame.add(new JScrollPane(prefPane)); + + JTextPane variablePane = new JTextPane(); + variablePane.setEditorKit(new CustomEditorKit()); + initJTextPane(variablePane); + frame.add(new JScrollPane(variablePane)); + frame.setSize(800, 400); + return frame; + } + + static void initJTextPane(JTextPane tp) { + + try { + Document doc = tp.getDocument(); + + doc.insertString(0, " Default Size Text ", null); + tp.setCaretPosition(doc.getLength()); + tp.insertComponent(new PaintLabel(0.0f)); + tp.insertComponent(new PaintLabel(0.2f)); + tp.insertComponent(new PaintLabel(0.5f)); + tp.insertComponent(new PaintLabel(0.7f)); + tp.insertComponent(new PaintLabel(1.0f)); + SimpleAttributeSet set = new SimpleAttributeSet(); + StyleConstants.setFontSize(set, 20); + tp.setCaretPosition(doc.getLength()); + doc.insertString(doc.getLength(), " Large Size Text ", set); + } catch (BadLocationException ble) { + throw new RuntimeException(ble); + } + } + + static class PaintLabel extends JLabel { + + private int pref = 40; + private int min = pref - 30; + private int max = pref + 30; + + public PaintLabel(float align) { + + setAlignmentY(align); + String alignStr = String.valueOf(align); + + setText("align = " + alignStr); + setOpaque(true); + setBackground(Color.PINK); + } + + public Dimension getMinimumSize() { + return new Dimension(super.getMinimumSize().width, min); + } + + public Dimension getPreferredSize() { + return new Dimension(super.getPreferredSize().width, pref); + } + + public Dimension getMaximumSize() { + return new Dimension(super.getMaximumSize().width, max); + } + + public void paintComponent(Graphics g) { + g.setColor(Color.PINK); + g.fillRect(0, 0, getWidth(), getHeight()); + int y = (int)(getAlignmentY() * getHeight()); + g.setColor(Color.BLACK); + g.drawLine(0, y, getWidth(), y); + g.drawString(getText(), 0, 10); + } + } + + static class CustomComponentView extends ComponentView { + + public CustomComponentView(Element elem) { + super(elem); + } + + public int getResizeWeight(int axis) { + return 1; + } +} + + static class CustomEditorKit extends StyledEditorKit implements ViewFactory { + + public View create(Element elem) { + if (StyleConstants.ComponentElementName.equals(elem.getName())) { + return new CustomComponentView(elem); + } else { + return super.getViewFactory().create(elem); + } + } + + public ViewFactory getViewFactory() { + return this; + } +} + +} diff --git a/test/jdk/javax/swing/text/GlyphView/bug4188841.java b/test/jdk/javax/swing/text/GlyphView/bug4188841.java new file mode 100644 index 00000000000..1b3cc0bcdd4 --- /dev/null +++ b/test/jdk/javax/swing/text/GlyphView/bug4188841.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @bug 4188841 + * @summary Tests a JTextPane wrapping issue + * @library /java/awt/regtesthelpers + * @build PassFailJFrame + * @run main/manual bug4188841 +*/ + +import java.awt.Dimension; +import javax.swing.JFrame; +import javax.swing.JScrollPane; +import javax.swing.JTextPane; + +public class bug4188841 { + + static final String INSTRUCTIONS = """ + The text pane contains the phrase "the quick brown fox jumps over the lazy dog", + all the words are separated by tabs. When the test starts, the whole phrase should + appear on one line. If it is wrapped along two or more lines, the test FAILS. + + Otherwise, place the text caret in the very end of the line (e.g. by clicking + in the line and hitting End). Press Enter twice. The text should appear as one + line at all times. If the text wraps when you press Enter, the test FAILS. + """; + + static class NoWrapTextPane extends JTextPane { + + public boolean getScrollableTracksViewportWidth() { + //should not allow text to be wrapped + return false; + } + + public void setSize(Dimension d) { + // don't let the Textpane get sized smaller than its parent + if (d.width < getParent().getSize().width) { + super.setSize(getParent().getSize()); + } + else { + super.setSize(d); + } + } + } + + static JFrame createUI() { + + JFrame frame = new JFrame("bug4188841"); + + NoWrapTextPane nwp = new NoWrapTextPane(); + nwp.setText("the\tslow\tbrown\tfox\tjumps\tover\tthe\tlazy\tdog!"); + nwp.setCaretPosition(nwp.getText().length()); + + JScrollPane scrollPane = new JScrollPane(nwp, + JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, + JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); + + frame.add(scrollPane); + frame.setSize(400, 300); + return frame; + } + + public static void main(String args[]) throws Exception { + PassFailJFrame.builder() + .title("Test Instructions") + .instructions(INSTRUCTIONS) + .columns(60) + .testUI(bug4188841::createUI) + .build() + .awaitAndCheck(); + } +} diff --git a/test/jdk/javax/swing/text/html/FormView/4473401/bug4473401.java b/test/jdk/javax/swing/text/html/FormView/4473401/bug4473401.java new file mode 100644 index 00000000000..29dbba7ca04 --- /dev/null +++ b/test/jdk/javax/swing/text/html/FormView/4473401/bug4473401.java @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @bug 4473401 + * @summary Tests if FormSubmitEvent is submitted correctly. + * @library /java/awt/regtesthelpers + * @build PassFailJFrame + * @run main/manual bug4473401 +*/ + +import java.io.File; +import javax.swing.JEditorPane; +import javax.swing.JFrame; +import javax.swing.event.HyperlinkEvent; +import javax.swing.event.HyperlinkListener; +import javax.swing.text.html.FormSubmitEvent; +import javax.swing.text.html.HTMLEditorKit; + +public class bug4473401 implements HyperlinkListener { + + static final String INSTRUCTIONS = """ + The test window displays an HTML frameset with a frame + on the left and another to the right. + Push the 'Submit Query' button in the left frame to perform testing. + The window should be updated to have only one frame with the + message 'If you see this page the test PASSED'. + If it appears, PASS the test, otherwise FAIL the test. + """; + + static JEditorPane jep; + static JFrame createUI() { + + JFrame frame = new JFrame("bug4473401"); + jep = new JEditorPane(); + jep.addHyperlinkListener(new bug4473401()); + HTMLEditorKit kit = new HTMLEditorKit(); + kit.setAutoFormSubmission(false); + jep.setEditorKit(kit); + jep.setEditable(false); + + try { + File file = new File(System.getProperty("test.src", "."), "frameset.html"); + System.out.println(file.toURI().toURL()); + jep.setPage(file.toURL()); + } catch (Exception e) { + throw new RuntimeException(e); + } + + frame.add(jep); + frame.setSize(500, 500); + return frame; + } + + public void hyperlinkUpdate(HyperlinkEvent e) { + if (e instanceof FormSubmitEvent) { + jep.setText("If you see this page the test PASSED"); + } + } + + public static void main(String args[]) throws Exception { + PassFailJFrame.builder() + .title("Test Instructions") + .instructions(INSTRUCTIONS) + .columns(40) + .testUI(bug4473401::createUI) + .build() + .awaitAndCheck(); + } +} diff --git a/test/jdk/javax/swing/text/html/FormView/4473401/frame1.html b/test/jdk/javax/swing/text/html/FormView/4473401/frame1.html new file mode 100644 index 00000000000..833bc1f6352 --- /dev/null +++ b/test/jdk/javax/swing/text/html/FormView/4473401/frame1.html @@ -0,0 +1,9 @@ + + +Push the Submit query button +
+
+ +
+ + diff --git a/test/jdk/javax/swing/text/html/FormView/4473401/frame2.html b/test/jdk/javax/swing/text/html/FormView/4473401/frame2.html new file mode 100644 index 00000000000..5bc6dba57fc --- /dev/null +++ b/test/jdk/javax/swing/text/html/FormView/4473401/frame2.html @@ -0,0 +1,4 @@ + + + + diff --git a/test/jdk/javax/swing/text/html/FormView/4473401/frameresult.html b/test/jdk/javax/swing/text/html/FormView/4473401/frameresult.html new file mode 100644 index 00000000000..6ef5c8198cc --- /dev/null +++ b/test/jdk/javax/swing/text/html/FormView/4473401/frameresult.html @@ -0,0 +1,5 @@ + + +If you see this page the test FAILED. + + diff --git a/test/jdk/javax/swing/text/html/FormView/4473401/frameset.html b/test/jdk/javax/swing/text/html/FormView/4473401/frameset.html new file mode 100644 index 00000000000..1e7f8298d62 --- /dev/null +++ b/test/jdk/javax/swing/text/html/FormView/4473401/frameset.html @@ -0,0 +1,11 @@ + + + + Manual test for bug 4463014 + + + + + + + \ No newline at end of file diff --git a/test/jdk/javax/swing/text/html/FormView/bug4529702.java b/test/jdk/javax/swing/text/html/FormView/bug4529702.java new file mode 100644 index 00000000000..4962a0a6663 --- /dev/null +++ b/test/jdk/javax/swing/text/html/FormView/bug4529702.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @bug 4529702 + * @summary Test that radio buttons with different names should be selectable at the same time + * @library /java/awt/regtesthelpers + * @build PassFailJFrame + * @run main/manual bug4529702 +*/ + +import javax.swing.JFrame; +import javax.swing.JTextPane; + +public class bug4529702 { + + static final String INSTRUCTIONS = """ + There are two rows of radio buttons, each row having two buttons. + If you can select radio buttons from the first and the second rows + at the same time the test PASSES otherwise the test FAILS. + """; + + static JFrame createUI() { + JFrame frame = new JFrame("bug4529702"); + JTextPane jtp = new JTextPane(); + jtp.setContentType("text/html"); + jtp.setText("

" + + "
"); + frame.add(jtp); + frame.setSize(200, 200); + return frame; + } + + public static void main(String[] args) throws Exception { + PassFailJFrame.builder() + .instructions(INSTRUCTIONS) + .columns(40) + .testUI(bug4529702::createUI) + .build() + .awaitAndCheck(); + } +} diff --git a/test/jdk/javax/swing/text/html/FrameSetView/4890934/bug4890934.java b/test/jdk/javax/swing/text/html/FrameSetView/4890934/bug4890934.java new file mode 100644 index 00000000000..988db296f7b --- /dev/null +++ b/test/jdk/javax/swing/text/html/FrameSetView/4890934/bug4890934.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @bug 4890934 + * @summary Tests if JEditor Pane updates the correct frame when using + * @library /java/awt/regtesthelpers + * @build PassFailJFrame + * @run main/manual bug4890934 +*/ + +import java.io.File; +import javax.swing.JEditorPane; +import javax.swing.JFrame; +import javax.swing.event.HyperlinkEvent; +import javax.swing.event.HyperlinkListener; +import javax.swing.text.html.HTMLDocument; +import javax.swing.text.html.HTMLEditorKit; +import javax.swing.text.html.HTMLFrameHyperlinkEvent; + +public class bug4890934 implements HyperlinkListener { + + static final String INSTRUCTIONS = """ + The test window displays an HTML frameset with a frame + on the left and another to the right. + Click the link in the left frame which should change the view. + The resulting page will tell you if the test PASSED or FAILED. + """; + + static JFrame createUI() { + + JFrame frame = new JFrame("bug4890934"); + JEditorPane jep = new JEditorPane(); + jep.setEditorKit(new HTMLEditorKit()); + jep.setEditable(false); + jep.addHyperlinkListener(new bug4890934()); + + try { + File file = new File(System.getProperty("test.src", "."), "frameset.html"); + System.out.println(file.toURI().toURL()); + jep.setPage(file.toURL()); + } catch (Exception e) { + throw new RuntimeException(e); + } + + frame.add(jep); + frame.setSize(600, 300); + return frame; + } + + public void hyperlinkUpdate(HyperlinkEvent e) { + if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { + JEditorPane pane = (JEditorPane) e.getSource(); + if (e instanceof HTMLFrameHyperlinkEvent) { + HTMLFrameHyperlinkEvent evt = (HTMLFrameHyperlinkEvent)e; + HTMLDocument doc = (HTMLDocument)pane.getDocument(); + doc.processHTMLFrameHyperlinkEvent(evt); + } + } + } + + public static void main(String args[]) throws Exception { + PassFailJFrame.builder() + .title("Test Instructions") + .instructions(INSTRUCTIONS) + .columns(40) + .testUI(bug4890934::createUI) + .build() + .awaitAndCheck(); + } +} diff --git a/test/jdk/javax/swing/text/html/FrameSetView/4890934/frame1.html b/test/jdk/javax/swing/text/html/FrameSetView/4890934/frame1.html new file mode 100644 index 00000000000..31f95568aae --- /dev/null +++ b/test/jdk/javax/swing/text/html/FrameSetView/4890934/frame1.html @@ -0,0 +1,8 @@ + + + + + + a link + + diff --git a/test/jdk/javax/swing/text/html/FrameSetView/4890934/frame2.html b/test/jdk/javax/swing/text/html/FrameSetView/4890934/frame2.html new file mode 100644 index 00000000000..5bc6dba57fc --- /dev/null +++ b/test/jdk/javax/swing/text/html/FrameSetView/4890934/frame2.html @@ -0,0 +1,4 @@ + + + + diff --git a/test/jdk/javax/swing/text/html/FrameSetView/4890934/frameresult.html b/test/jdk/javax/swing/text/html/FrameSetView/4890934/frameresult.html new file mode 100644 index 00000000000..a31045833b5 --- /dev/null +++ b/test/jdk/javax/swing/text/html/FrameSetView/4890934/frameresult.html @@ -0,0 +1,7 @@ + + +If you see this text in the RIGHT frame the test PASSED. +

If you see this text in the LEFT frame the test FAILED. + + + diff --git a/test/jdk/javax/swing/text/html/FrameSetView/4890934/frameset.html b/test/jdk/javax/swing/text/html/FrameSetView/4890934/frameset.html new file mode 100644 index 00000000000..9462e1894a5 --- /dev/null +++ b/test/jdk/javax/swing/text/html/FrameSetView/4890934/frameset.html @@ -0,0 +1,11 @@ + + + + Manual test for bug 4463014 + + + + + + + From fb043ac7322c3830d52b882ff6539307410a6611 Mon Sep 17 00:00:00 2001 From: Satyen Subramaniam Date: Thu, 11 Sep 2025 17:43:08 +0000 Subject: [PATCH 2/2] Backport 8c760e78b9e3851d40f8036105666e9c451b09a1 --- test/jdk/javax/swing/text/GlyphView/bug4188841.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/jdk/javax/swing/text/GlyphView/bug4188841.java b/test/jdk/javax/swing/text/GlyphView/bug4188841.java index 1b3cc0bcdd4..9935712bd49 100644 --- a/test/jdk/javax/swing/text/GlyphView/bug4188841.java +++ b/test/jdk/javax/swing/text/GlyphView/bug4188841.java @@ -69,7 +69,7 @@ static JFrame createUI() { JFrame frame = new JFrame("bug4188841"); NoWrapTextPane nwp = new NoWrapTextPane(); - nwp.setText("the\tslow\tbrown\tfox\tjumps\tover\tthe\tlazy\tdog!"); + nwp.setText("the\tquick\tbrown\tfox\tjumps\tover\tthe\tlazy\tdog!"); nwp.setCaretPosition(nwp.getText().length()); JScrollPane scrollPane = new JScrollPane(nwp,