私がやりたいことは、ボタンをアプリケーションの左下に置くことです。誰かがそれを行う方法の例を教えてもらえますか?
これは私が持っているものです:
これが私のコードです:
super("Test");
/**Create Components**/
JPanel addPanel = new JPanel();
JButton addButton= new JButton("Add");
/**Add Components**/
addPanel.add(addButton);
this.add(addPanel);
/**Set Components Properties**/
addButton.setLocation(12, 371);
addButton.setPreferredSize(new Dimension(116, 40));
addPanel.setLocation(12, 371);
addPanel.setPreferredSize(new Dimension(116, 40));
/**Frame Properties**/
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setPreferredSize(new Dimension(dimension1, dimension2));
this.setResizable(false);
this.pack();
this.setVisible(true);