JFrame 全体をカバーする JPanel を追加するための正しい構文を知りたいです。
これまでに書いたコードは次のとおりです。
package frame;
import javax.swing.JFrame;
public class Frame {
public static void main(String[] args) {
JFrame Frame = new JFrame("My Window");
Frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Frame.setVisible(true);
Frame.setSize(320, 240);
Frame.setResizable(false);
Frame.setLocationRelativeTo(null);
//Thanks in advance
}
}