Here is one proposal (it could be largely improved but at least, you'll have a startig point):
public static void main(String[] args) throws Exception {
String[][] transactions = new String[][] { { "0", "Check", "50.00" }, { "1", "svc.chrg.", "0.15" } };
JDialog f = new JDialog();
JTable table = new JTable(transactions, new String[] { "Id", "Type", "Amount" });
f.add(new JLabel("List all transactions:", JLabel.CENTER), BorderLayout.NORTH);
f.add(new JScrollPane(table));
f.setTitle("Dialog Display");
table.setPreferredSize(new Dimension(table.getPreferredSize().width, table.getRowHeight()
* transactions.length));
f.pack();
f.setSize(470, 120);
f.setLocationRelativeTo(null); // Center on screen
f.setVisible(true);
f.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
}