rendered paste bodyimport java.awt.* ; import java.util.Vector;import javax.swing.* ;public class Main { public static void main(String[] args) { App window = new App() ; }}class App { protected JTable table ; protected JButton addButton ; protected JButton deleteButton ; App() { JFrame window = new JFrame() ; Container content = window.getContentPane() ; window.setSize(400, 200) ; window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); content.setLayout(new BorderLayout()); table = new JTable() ; JPanel rightPanel = new JPanel() ; JScrollPane scrollPane = new JScrollPane(table) ; table.setFillsViewportHeight(true); content.add(scrollPane, BorderLayout.CENTER) ; addButton = new JButton("Add CD") ; deleteButton = new JButton("Delete CD") ; rightPanel.setLayout(new GridBagLayout()) ; GridBagConstraints c = new GridBagConstraints() ; c.fill = GridBagConstraints.VERTICAL ; c.gridx = 0 ; c.gridy = 0 ; rightPanel.add(addButton, c) ; c.gridy = 1 ; rightPanel.add(deleteButton,c) ; content.add(rightPanel, BorderLayout.LINE_END) ; window.pack() ; window.setVisible(true) ; } }