[英]how to build a JFrame window with a graphic area paintComponent with JTextField, JButton and JLabel?
最簡單的方法是使用BorderLayout並在您想要的區域(北、南、東、西或中心)包含您的面板(“分離的組件”)。
JFrame frame = new JFrame();
JPanel actions = new JPanel();
JPanel graph = new JPanel();
frame.setLayout(new BorderLayout());
frame.getContentPane().add(actions, BorderLayout.SOUTH);
frame.getContentPane().add(graph, BorderLayout.CENTER);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.