1
我不能讓我的JLabel在我的JPanel中心加入ChartPanel它後:BorderLayout.CENTER不居中
JPanel panel = new JPanel(new BorderLayout());
panel.add(visualiser(ternaire), BorderLayout.NORTH);//visualiser(ternaire) is the ChartPanel
panel.add(new JLabel("L'alliage a bien été enregistré."), BorderLayout.CENTER);
JOptionPane jop = new JOptionPane();
jop.showMessageDialog(null, panel, "Information", JOptionPane.PLAIN_MESSAGE);
任何想法,爲什麼BorderLayout.CENTER不起作用?
這工作就好非常感謝! – JohnND