-
Bug
-
Resolution: Fixed
-
P4
-
1.2.1
-
beta
-
generic
-
generic
Name: dbT83986 Date: 04/25/99
Inserting a text edit field into an editor pane results in a JTextField maximized to fill all the emtpy space in a line regardless of the specified number of columns.
This behavior shows up in the StyledEditor as well as in the HTMLEditor.
This problem is of two levels:
Level 1 problem (for StyledText), I believe, is within the code for SizeRequirements.expandedTile(). The computed factor and computed play make no sense if the maximum size for a component view is not specified (i.e. set to Integer.MAX_VALUE)
Level 2 (for HTML text), I believe, is in the fact that when the FormView creates an instance of JTextField representing a text input of a given size, it only sets the preferred width I believe it should also set the maximum (and, maybe a min).
===================
REVIEW CODE 4/25/99
import javax.swing.*;
public class inc52362 extends JFrame
{
String html = "<html><head><title>Test</title></head><body><form><input type=\"text\" size=\"5\"></form></body></html>";
public inc52362()
{
JEditorPane e = new JEditorPane("text/html", html);
e.setEditable(false);
getContentPane().add(e);
setSize(400,300);
}
public static void main(String[] args)
{
new inc52362().show();
}
}
(Review ID: 57379)
======================================================================