-
Bug
-
Resolution: Fixed
-
P3
-
1.0, 7, 8, 8u40
-
b65
-
x86
-
windows_xp, windows_vista
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8084881 | emb-9 | Semyon Sadetsky | P3 | Resolved | Fixed | team |
platform: VistaUltimate_64bit
build:1.7.0.b64
Case#: closed/javax/swing/text/DefaultCaret/4785160/bug4785160.java
# Case description:
Ensure that the horizontal scrollbar is visible in the JTextArea(or reduce the
with of applet so that the scrollbar becomes visible).Move the text caret in
the text area to the end of line. Test passed if the caret is visible at the
end of the line,failed if the caret disappears when moved to the end of the
line.
# Actual behavior:
The caret disappears when moved to the end of the line.
Attached is the screenshots
# Exceptions:
None
# Steps to reproduce:
1).do as the following code:
---------Begin code---------
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.text.*;
import javax.swing.text.html.*;
///manual=yesno
public class bug4785160 extends JApplet {
JTextArea area = null;
public void init() {
super.init();
try {
//get default lookandfeel
System.out.println(UIManager.getLookAndFeel());
//set nimbuslookandfeel---------------------------
UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
}catch (Exception ex1) {
}
try {
area = new JTextArea();
getContentPane().add(new JScrollPane(area));
area.setText("mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm");
area.getCaret().setDot(area.getText().length() + 1);
area.requestFocus();
} catch(Exception e) {
System.out.println("Unexpected exception :");
e.printStackTrace();
throw new RuntimeException("Test failed.");
}
}
}
---------End code-----------
2).compile the code:${JDK7_HOME}/bin/javac bug4785160.java
compile successfully.
3).run the class file:${JDK7_HOME}/bin/java bug4785160
4).os default lookandfeel is MetalLookAndFeel,the case fail
5).set lookandfeel as Nimbus,please see the code's comment¿the case pass.
#Validation
same issues happens to;
Product: j2se
OS: ubuntu9.04-i586
JDK/JREBuildNo.: 1.7.0b66
affects test
javax/swing/text/DefaultCaret/4785160/bug4785160.java
build:1.7.0.b64
Case#: closed/javax/swing/text/DefaultCaret/4785160/bug4785160.java
# Case description:
Ensure that the horizontal scrollbar is visible in the JTextArea(or reduce the
with of applet so that the scrollbar becomes visible).Move the text caret in
the text area to the end of line. Test passed if the caret is visible at the
end of the line,failed if the caret disappears when moved to the end of the
line.
# Actual behavior:
The caret disappears when moved to the end of the line.
Attached is the screenshots
# Exceptions:
None
# Steps to reproduce:
1).do as the following code:
---------Begin code---------
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.text.*;
import javax.swing.text.html.*;
///manual=yesno
public class bug4785160 extends JApplet {
JTextArea area = null;
public void init() {
super.init();
try {
//get default lookandfeel
System.out.println(UIManager.getLookAndFeel());
//set nimbuslookandfeel---------------------------
UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
}catch (Exception ex1) {
}
try {
area = new JTextArea();
getContentPane().add(new JScrollPane(area));
area.setText("mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm");
area.getCaret().setDot(area.getText().length() + 1);
area.requestFocus();
} catch(Exception e) {
System.out.println("Unexpected exception :");
e.printStackTrace();
throw new RuntimeException("Test failed.");
}
}
}
---------End code-----------
2).compile the code:${JDK7_HOME}/bin/javac bug4785160.java
compile successfully.
3).run the class file:${JDK7_HOME}/bin/java bug4785160
4).os default lookandfeel is MetalLookAndFeel,the case fail
5).set lookandfeel as Nimbus,please see the code's comment¿the case pass.
#Validation
same issues happens to;
Product: j2se
OS: ubuntu9.04-i586
JDK/JREBuildNo.: 1.7.0b66
affects test
javax/swing/text/DefaultCaret/4785160/bug4785160.java
- backported by
-
JDK-8084881 J2SE_Swing_Reg: the caret disappears when moving to the end of the line.
- Resolved
- relates to
-
JDK-8081484 [TEST_BUG]Test javax/swing/plaf/basic/6866751/bug6866751.java fails
- Resolved
-
JDK-8098835 [PIT] Endless loop in JEditorPane
- Resolved
-
JDK-8078483 Apparent endless loop running JEditorPanePaintTest
- Resolved