ok i just created a text box with JTextField
here is the code:-
public class TextField1 extends JApplet implements ActionListener { JTextField Input; JTextField Echo; LayoutManager Layout; public TextField1 () { Panel.setSize(700,400); Echo = new JTextField ("", 20); Input = new JTextField ("", 20); Layout = new FlowLayout (); Echo.setEditable (false); Input.setBackground (Color.white); Input.addActionListener (this); Panel.setLayout (Layout); Panel.add (Echo); Panel.add (Input); Panel.setVisible(true); } public void actionPerformed (ActionEvent e) { Echo.setText (Input.getText()); Input.setText(""); } }
this is sub-class of the main class and Panel is JFrame
i need help in changing the length of Echo(not the bredth).
Plz Help
Regards.