I want to place a button at [row 2 column 2], it keeps going to [row 3 column 2]. When I use a JTextField, it works fine. Here is the code of the two.
Using the JButton
Code:
public Rpg()
{
setTitle("Fantasy Game");
output = addTextArea ("" ,1,1,1,1);
commandField = addTextField ("" ,2,1,1,1);
enterButton = addButton ("Enter" ,2,2,1,1);
}
Using the JTextField
Code:
public Rpg()
{
setTitle("Fantasy Game");
output = addTextArea ("" ,1,1,1,1);
commandField = addTextField ("" ,2,1,1,1);
enterButton = addTextField ("Enter" ,2,2,1,1);
}
A screenshot of the two next to each other can be seen at:
http://www.freewebs.com/endlessxxhopes/problem.JPG
Thanks for any help