Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.*;
- import java.awt.*;
- /**
- * Created by Admin on 17.11.2017.
- */
- public class OwnerTable extends JFrame {
- private OwnerTableModel ownerTableModel = new OwnerTableModel();
- private JTable ownerTable = new JTable(ownerTableModel);
- private JScrollPane ownerTableScroll = new JScrollPane(ownerTable);
- public OwnerTable(){
- super("Owner table");
- this.setSize(new Dimension(960, 540));
- this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
- this.setLocationRelativeTo(null);
- Container container = this.getContentPane();
- container.setLayout(new GridBagLayout());
- ownerTableScroll.setPreferredSize(new Dimension(400, 400));
- ownerTable.getTableHeader().setReorderingAllowed(false);
- container.add(ownerTableScroll,
- new GridBagConstraints(0, 0, 1, 5, 20, 1,
- GridBagConstraints.NORTH,
- GridBagConstraints.BOTH,
- new Insets(1, 1, 1, 1), 0, 0));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement