The problem is that I have the JFrame and it is perfect, with its title and others. When I try to instantiate a button, it does not appear in any coordinate that adds it.
package neuronaia;
import javax.swing.*;
public class MainWindow extends JFrame{
public static void main(String[] args) {
// TODO Auto-generated method stub
JFrame Ap = new JFrame();
Ap.setLayout(null);
Ap.setSize(500,500);
Ap.setTitle("Aprendizaje");
Ap.setDefaultCloseOperation(Ap.EXIT_ON_CLOSE);
Ap.setVisible(true);
Ap.setLocationRelativeTo(null);
JButton button1 = new JButton("Aceptar");
button1.setBounds(15, 15, 45, 15);
}
}