-
Bug
-
Resolution: Unresolved
-
P4
-
8, 11, 17, 19
-
None
-
Fix Understood
When JEditorPane shown HTML multi-selection form, a reset operation broke its drawing.
Recreate steps:
1. Select item 4.
2. Push the reset button
3. Move focus to other application
4. Move focus back to this sample
=> Item 2 was selected.
-------
import java.awt.BorderLayout;
import javax.swing.JEditorPane;
import javax.swing.JFrame;
public class ResetSelectForm {
public static void main(String[] args) throws Exception {
JEditorPane html = new JEditorPane("text/html",
"<html><body><form action=\"http://localhost.cgi\">" +
"<select name=select id=\"mySelect\" size=\"5\" multiple> \n" +
" <option>1</option> \n" +
" <option>2</option> \n" +
" <option>3</option> \n" +
" <option>4</option> \n" +
" <option>5</option> \n" +
"</select> " +
"<br>" +
"<input type=reset name=reset value=\"reset\"/>" +
"<br>" +
"<input type=submit name=submit value=\"submit\"/>" +
"</form></body></html>");
JFrame frame = new JFrame();
frame.setSize(200, 200);
frame.setLayout(new BorderLayout());
frame.add(html, BorderLayout.CENTER);
frame.setVisible(true);
}
}
Recreate steps:
1. Select item 4.
2. Push the reset button
3. Move focus to other application
4. Move focus back to this sample
=> Item 2 was selected.
-------
import java.awt.BorderLayout;
import javax.swing.JEditorPane;
import javax.swing.JFrame;
public class ResetSelectForm {
public static void main(String[] args) throws Exception {
JEditorPane html = new JEditorPane("text/html",
"<html><body><form action=\"http://localhost.cgi\">" +
"<select name=select id=\"mySelect\" size=\"5\" multiple> \n" +
" <option>1</option> \n" +
" <option>2</option> \n" +
" <option>3</option> \n" +
" <option>4</option> \n" +
" <option>5</option> \n" +
"</select> " +
"<br>" +
"<input type=reset name=reset value=\"reset\"/>" +
"<br>" +
"<input type=submit name=submit value=\"submit\"/>" +
"</form></body></html>");
JFrame frame = new JFrame();
frame.setSize(200, 200);
frame.setLayout(new BorderLayout());
frame.add(html, BorderLayout.CENTER);
frame.setVisible(true);
}
}
- links to
-
Review openjdk/jdk/10685