J'ai un problème pour afficher deux panneaux dans Jframe. S'il vous plaît aidez-moi à corriger le code ci-dessousJFrame: impossible d'afficher deux panneaux dans jframe
public class quotingtable extends javax.swing.JFrame {
DefaultTableModel model;
JTable table;
JButton SetButton = new JButton("Set Symbol");
JButton VNStock = new JButton("VNStockChart");
JButton Global = new JButton("GlobalChart");
JPanel quotingpanel = new JPanel(new BorderLayout());
JPanel functionpanel = new JPanel(new BorderLayout());
public void run(){
model = new DefaultTableModel(col,row);
quotingpanel.add(table);
functionpanel.add(BorderLayout.CENTER,SetButton);
functionpanel.add(BorderLayout.WEST,VNStock);
functionpanel.add(BorderLayout.EAST,Global);
table = new JTable(model);
JScrollPane pane = new JScrollPane(table);
quotingpanel.add(pane);
getContentPane().add(BorderLayout.CENTER,functionpanel);
getContentPane().add(BorderLayout.SOUTH,quotingpanel);
setSize(800,800);
setLayout(new FlowLayout());
setLayout (new BorderLayout());
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
Toute aide est appréciée.
Supprimer 'setLayout (nouveau FlowLayout());' et 'setLayout (nouveau BorderLayout());' qui apparaissent à la fin de la code – MadProgrammer