Creates the components necessary to to implement
this view. The component returned is a JPanel
,
that contains the PROMPT to the left and JTextField
to the right.
AttributeSet attr = getElement().getAttributes();
JPanel panel = new JPanel(new BorderLayout());
panel.setBackground(null);
String prompt = (String)attr.getAttribute(HTML.Attribute.PROMPT);
if (prompt == null) {
prompt = UIManager.getString("IsindexView.prompt");
}
JLabel label = new JLabel(prompt);
textField = new JTextField();
textField.addActionListener(this);
panel.add(label, BorderLayout.WEST);
panel.add(textField, BorderLayout.CENTER);
panel.setAlignmentY(1.0f);
panel.setOpaque(false);
return panel;