-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
5.0
-
x86
-
windows_xp
FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
HTMLEditorKit is used on JTextPane to display the HTML Text.
When the text contains long alpbetical ordered list,
the HTMLEditorKit displays it correctly till the list alphabet is 'AY'.
But, after list number 'AY', the next list number should be 'AZ', but instead it is displayed as 'B`' which is incorrect. This is happening when the series of 26 alphabets (A-Z) gets over. Because of this you will see this problem for BZ, CZ, DZ,.... and so on.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the given sample code.
Look at the List item number 52 (marked red)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The list alphabet after 'AY' should be 'AZ'
ACTUAL -
The list alphabet after 'AY' is appearing 'B`'
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.*;
import javax.swing.*;
import javax.swing.text.html.*;
public class EditorKitTest extends JFrame {
public EditorKitTest() throws HeadlessException {
super("HTMLEditorKitTest");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel testPanel = new JPanel();
JTextPane textPane = new JTextPane();
textPane.setEditorKit(new HTMLEditorKit());
String orderedList = "<ol type=\"A\"><li>List Item 1</li><li>List Item 2</li><li>List Item 3</li><li>List Item 4</li><li>List Item 5</li><li>List Item 6</li><li>List Item 7</li><li>List Item 8</li><li>List Item 9</li><li>List Item 10</li><li>List Item 11</li><li>List Item 12</li><li>List Item 13</li><li>List Item 14</li><li>List Item 15</li><li>List Item 16</li><li>List Item 17</li><li>List Item 18</li><li>List Item 19</li><li>List Item 20</li><li>List Item 21</li><li>List Item 22</li><li>List Item 23</li><li>List Item 24</li><li>List Item 25</li><li>List Item 26</li><li>List Item 27</li><li>List Item 28</li><li>List Item 29</li><li>List Item 30</li><li>List Item 31</li><li>List Item 32</li><li>List Item 33</li><li>List Item 34</li><li>List Item 35</li><li>List Item 36</li><li>List Item 37</li><li>List Item 38</li><li>List Item 39</li><li>List Item 40</li><li>List Item 41</li><li>List Item 42</li><li>List Item 43</li><li>List Item 44</li><li>List Item 45</li><li>List Item 46</li><li>List Item 47</li><li>List Item 48</li><li>List Item 49</li><li>List Item 50</li><li>List Item 51</li><li><b><font color=\"#FF0000\">List Item 52</font></b></li><li>List Item 53</li><li>List Item 54</li><li>List Item 55</li><li>List Item 56</li><li>List Item 57</li><li>List Item 58</li><li>List Item 59</li><li>List Item 60</li><li>List Item 61</li><li>List Item 62</li><li>List Item 63</li><li>List Item 64</li><li>List Item 65</li><li>List Item 66</li><li>List Item 67</li><li>List Item 68</li><li>List Item 69</li><li>List Item 70</li><li>List Item 71</li><li>List Item 72</li><li>List Item 73</li><li>List Item 74</li><li>List Item 75</li><li>List Item 76</li><li>List Item 77</li></ol>";
testPanel.setSize(200, 400);
textPane.setText(orderedList);
testPanel.add(textPane);
JScrollPane scrollPane = new JScrollPane(testPanel);
add(scrollPane);
pack();
setVisible(true);
}
public static void main(String[] args) {
EditorKitTest editorKitTest = new EditorKitTest();
}
}
---------- END SOURCE ----------
A DESCRIPTION OF THE PROBLEM :
HTMLEditorKit is used on JTextPane to display the HTML Text.
When the text contains long alpbetical ordered list,
the HTMLEditorKit displays it correctly till the list alphabet is 'AY'.
But, after list number 'AY', the next list number should be 'AZ', but instead it is displayed as 'B`' which is incorrect. This is happening when the series of 26 alphabets (A-Z) gets over. Because of this you will see this problem for BZ, CZ, DZ,.... and so on.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the given sample code.
Look at the List item number 52 (marked red)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The list alphabet after 'AY' should be 'AZ'
ACTUAL -
The list alphabet after 'AY' is appearing 'B`'
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.*;
import javax.swing.*;
import javax.swing.text.html.*;
public class EditorKitTest extends JFrame {
public EditorKitTest() throws HeadlessException {
super("HTMLEditorKitTest");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel testPanel = new JPanel();
JTextPane textPane = new JTextPane();
textPane.setEditorKit(new HTMLEditorKit());
String orderedList = "<ol type=\"A\"><li>List Item 1</li><li>List Item 2</li><li>List Item 3</li><li>List Item 4</li><li>List Item 5</li><li>List Item 6</li><li>List Item 7</li><li>List Item 8</li><li>List Item 9</li><li>List Item 10</li><li>List Item 11</li><li>List Item 12</li><li>List Item 13</li><li>List Item 14</li><li>List Item 15</li><li>List Item 16</li><li>List Item 17</li><li>List Item 18</li><li>List Item 19</li><li>List Item 20</li><li>List Item 21</li><li>List Item 22</li><li>List Item 23</li><li>List Item 24</li><li>List Item 25</li><li>List Item 26</li><li>List Item 27</li><li>List Item 28</li><li>List Item 29</li><li>List Item 30</li><li>List Item 31</li><li>List Item 32</li><li>List Item 33</li><li>List Item 34</li><li>List Item 35</li><li>List Item 36</li><li>List Item 37</li><li>List Item 38</li><li>List Item 39</li><li>List Item 40</li><li>List Item 41</li><li>List Item 42</li><li>List Item 43</li><li>List Item 44</li><li>List Item 45</li><li>List Item 46</li><li>List Item 47</li><li>List Item 48</li><li>List Item 49</li><li>List Item 50</li><li>List Item 51</li><li><b><font color=\"#FF0000\">List Item 52</font></b></li><li>List Item 53</li><li>List Item 54</li><li>List Item 55</li><li>List Item 56</li><li>List Item 57</li><li>List Item 58</li><li>List Item 59</li><li>List Item 60</li><li>List Item 61</li><li>List Item 62</li><li>List Item 63</li><li>List Item 64</li><li>List Item 65</li><li>List Item 66</li><li>List Item 67</li><li>List Item 68</li><li>List Item 69</li><li>List Item 70</li><li>List Item 71</li><li>List Item 72</li><li>List Item 73</li><li>List Item 74</li><li>List Item 75</li><li>List Item 76</li><li>List Item 77</li></ol>";
testPanel.setSize(200, 400);
textPane.setText(orderedList);
testPanel.add(textPane);
JScrollPane scrollPane = new JScrollPane(testPanel);
add(scrollPane);
pack();
setVisible(true);
}
public static void main(String[] args) {
EditorKitTest editorKitTest = new EditorKitTest();
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-6512801 With JEditorPane and JTextPane the numbering of alphanumeric list is wrong
-
- Open
-