Pessoal este codigo rodou legal, com um detalhe o Jbutoon nao muda de posiçao dentro do Jframe, alguem pode me dar uma dica
import javax.swing.*;
public class Myframe
{
public static void main(String args[])
{
JFrame frame = new JFrame(“I.M.C”);
JButton Botao = new JButton(“Calcular”);
frame.getContentPane().add(Botao);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
frame.setSize(500,400);
frame.setLocationRelativeTo(null);
Botao.setLocation(10,10);//----------------este comnado nao esta funcionando
}
}