I have added my button to my Container which can hold components, everything works fine however, the clearButton.setLocation() method below is not working. any ideas?
public JButton clearButton(){ // clearButton method
JButton clearButton = new JButton("CLEAR"); // new button of type JButton
clearButton.setPreferredSize(new Dimension(200,30)); // dimension of the button
clearButton.setLocation(400,450);
return clearButton; // return reference to the JButton object
}