private void initComponents() {
        setLayout(new BorderLayout());

        JPanel sidePanel = new JPanel(new BorderLayout());
        sidePanel.add(infoPanel, BorderLayout.NORTH);
        sidePanel.add(new JSeparator(), BorderLayout.CENTER);

        JPanel buttonPanel = new JPanel(new GridLayout(3, 1));

        JButton spendButton = new JButton("Spend");
        spendButton.setVisible(!account.isClosed() && controller.getCurrentUser() == accountOwner
                && (account.getType() == Account.Type.CHECKING || account.getType() == Account.Type.LINE_OF_CREDIT));
        spendButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                spend();
            }
        });
        buttonPanel.add(spendButton);

        JButton transferButton = new JButton("Transfer");
        transferButton.setVisible(!account.isClosed() && controller.getCurrentUser() == accountOwner &&
                !account.getType().isLoan());
        transferButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                transfer();
            }
        });
        buttonPanel.add(transferButton);

        final JButton flagButton = new JButton("Flag transaction");
        flagButton.setEnabled(false);
        flagButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                flag();
            }
        });
        buttonPanel.add(flagButton);

        sidePanel.add(buttonPanel, BorderLayout.SOUTH);

        add(sidePanel, BorderLayout.WEST);

        historyTable = new JTable();
        historyTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        historyTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
            @Override
            public void valueChanged(ListSelectionEvent e) {
                flagButton.setEnabled(false);
                if (!account.isClosed() && historyTable.getSelectedRow() >= 0) {
                    Transaction transaction = account.getHistory().get(historyTable.getSelectedRow());
                    if (Bank.getInstance().getCurrentMonth() - transaction.getTimestamp() < 2 && transaction.getFraudStatus()!=Transaction.FraudStatus.REVERSED) {
                        flagButton.setEnabled(true);
                    }
                }
            }
        });
        JScrollPane tablePane = new JScrollPane(historyTable);
        add(tablePane, BorderLayout.CENTER);
    }