I want to display the JTable table created from My Bill_Master database as like a message dialog in JOptionPane.showMessageDiaolg
. I tried to display it using a new JFrame,but it was unsuccessful.
JPanel panel = new JPanel(new GridLayout());
JScrollPane scrollPane = new JScrollPane();
scrollPane.setViewportView(table);
panel.add(scrollPane);
JOptionPane.showConfirmDialog(null, panel, "Bill Details",JOptionPane.OK_CANCEL_OPTION);