how to change the coordinates of JTextfield
800328Jan 11 2007 — edited Jan 15 2007i want to change the coordinates of the jtextfield[ ] ...here is the code
import java.awt.*;
import java.applet.*;
import java.util.*;
import java.lang.Math.*;
import javax.swing.*;
import java.awt.Toolkit;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class tm extends JApplet implements ActionListener{
public void init()
{
Container contentPane = getContentPane();
contentPane.setLayout(new FlowLayout());
JButton loadi = new JButton("LOAD INPUT STRING");
contentPane.add(loadi);
loadi.addActionListener(this);
JButton loadp = new JButton("LOAD PROGRAM");
contentPane.add(loadp);
loadp.addActionListener(this);
JButton run = new JButton("RUN");
contentPane.add(run);
run.addActionListener(this);
JButton step = new JButton("STEP");
contentPane.add(step);
step.addActionListener(this);
JTextField[] prog = new JTextField[10];
for(int i=0;i<prog.length;i++)
{
prog= new JTextField(10);
contentPane.add(prog[i]);
}
}
public void actionPerformed(ActionEvent e)
{
}
}