I just want to align the button to right of the bottom. This code below not working as expected.
class Frame extends JFrame {
public Frame() {
JButton closeButton = new JButton("Close");
closeButton.setSize(new Dimension(75, 25));
closeButton.setLocation(new Point(225, 275));
add(closeButton);
setDefaultCloseOperation(EXIT_ON_CLOSE);
setSize(300, 300);
setLayout(null);
setTitle("Frame");
setVisible(true);
}
}