Salvar dados de uma tabela estrangeira em outra tabela

Tenho a seguinte situação: Estou fazendo um pequeno cadastro de pedido em que necessito salvar os itens do pedido que estão em uma outra tabela do BD. tabela Pedido contém id, id_cliente, id_vendedor, data e id_pedido_itens a tabela Pedido_itens contem id, id_produto, quantidade, valor_unitario e perc_desconto.

No meu projeto atual, ele salva somente os campos da tabela Pedido embora ele mostre na tela os dados do pedido_itens.

esta é o meu código do cadastro de pedido. Se precisarem mais códigos eu edito a pergunta e posto. Desde já agradeço.

public class CadPedido extends javax.swing.JFrame {

BuscaPedido buscaPedido;
BuscaCliente buscaCliente;
BuscaProduto buscaProduto;
BuscaVendedor buscaVendedor;

// obejetos que compoe o pedido
Cliente clienteDoPedido;
Vendedor vendedorDoPedido;
ArrayList<PedidoItens> itensDoPedido;

public static String getDataAtualString() {
    return Formatar("dd/MM/yyyy", getDataAtualDate());
}

public CadPedido() {
    setExtendedState(MAXIMIZED_BOTH);

    initComponents();
      setIcon();
    //objetos buscas
    buscaPedido = new BuscaPedido(this);
    buscaCliente = new BuscaCliente(this);
    buscaVendedor = new BuscaVendedor(this);
    itensDoPedido = new ArrayList<>();
    buscaProduto = new BuscaProduto(this);
    jbLimparActionPerformed(null);

} 


 private void setIcon() {
    setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("pwa2.jpg")));
}


public void montaDaBusca(String idPedidoSelecionado) {
    jtfId.setText(idPedidoSelecionado);
    jtfIdFocusLost(null);
}

public void montaDaBuscaCliente(String idClienteSelecionado) {
    clienteDoPedido = ClienteDao.
            getClienteById(Integer.parseInt(idClienteSelecionado));
    if (clienteDoPedido != null) {
        jtfIdCliente.setText(String.valueOf(clienteDoPedido.getId()));
        jtfCliente.setText(clienteDoPedido.getEmpresa());
    }
}

public void montaDaBuscaVendedor(String idVendedorSelecionado) {
    vendedorDoPedido = VendedorDao.
            getVendedorById(Integer.parseInt(idVendedorSelecionado));
    if (vendedorDoPedido != null) {
        jtfIdVendedor.setText(String.valueOf(vendedorDoPedido.getId()));
        jtfVendedor.setText(vendedorDoPedido.getNome());
    }
}

public void montaDaBuscaProduto(String idProdutoSelecionado) {
    Produto prod = ProdutoDao.getProdutoById(Integer.parseInt(idProdutoSelecionado));
    PedidoItens pedIt = new PedidoItens();
    pedIt.setProduto(prod);
    pedIt.setValorUnitario(prod.getPreco());
    jtfItem.setText(prod.getDescricao());
    itensDoPedido.add(pedIt);

}

public void montaGradeItens() {
    String[] titulos = {"Descrição", "Qtde", "Preço", "-%", "Sb Total"};
    DefaultTableModel dtm = new DefaultTableModel(titulos, 0);
    double totalPedido = 0.0;
    for (PedidoItens it : itensDoPedido) {
        Double subTotalDoItem = (it.getQuantidade() * it.getValorUnitario());
        subTotalDoItem = subTotalDoItem - ((subTotalDoItem / 100)) * it.getPercDesconto();
        totalPedido += subTotalDoItem;
        String[] linha = {it.getProduto().getDescricao(),
            Numeros.Formatar("#0.00", it.getQuantidade()),
            Numeros.Formatar("#0.00", it.getValorUnitario()),
            Numeros.Formatar("#0.00", it.getPercDesconto()),
            Numeros.Formatar("#0.00", subTotalDoItem)};
        dtm.addRow(linha);
    }
    jtResultado.setModel(dtm);
    jlbTotal.setText("Total: R$" + Numeros.Formatar("#0.00", totalPedido));

}

public void preencherTela(Pedido pedido) {
    jtfId.setText(String.valueOf(pedido.getId()));
    jtfData.setText(Datas.Formatar("dd/MM/yyyy", pedido.getData()));
    jtfIdCliente.setText(String.valueOf(pedido.getIdCliente()));
    jtfIdVendedor.setText(String.valueOf(pedido.getIdVendedor()));


}

public Pedido getPedidoFromTela() throws ParseException {
      Date date = new Date();
    SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
  
    Pedido pedDaTela = new Pedido();
    pedDaTela.setData(sdf.parse(jtfData.getText()));
    pedDaTela.setId(Integer.parseInt(jtfId.getText()));
    pedDaTela.setIdCliente(Integer.parseInt(jtfIdCliente.getText()));
    pedDaTela.setIdVendedor(Integer.parseInt(jtfIdVendedor.getText()));
    return pedDaTela;

} 




@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">                          
private void initComponents() {

    jButton5 = new javax.swing.JButton();
    bgEntrega = new javax.swing.ButtonGroup();
    popExcluir = new javax.swing.JPopupMenu();
    jMenuItem1 = new javax.swing.JMenuItem();
    jLabel1 = new javax.swing.JLabel();
    jtfCliente = new javax.swing.JTextField();
    jLabel2 = new javax.swing.JLabel();
    jtfVendedor = new javax.swing.JTextField();
    jLabel3 = new javax.swing.JLabel();
    jtfItem = new javax.swing.JTextField();
    jLabel4 = new javax.swing.JLabel();
    jtfQuantidade = new javax.swing.JTextField();
    jbBuscaCliente = new javax.swing.JButton();
    jbBuscaVendedor = new javax.swing.JButton();
    jLabel5 = new javax.swing.JLabel();
    jtfDesconto = new javax.swing.JTextField();
    jbBuscaItem = new javax.swing.JButton();
    jbAdicionar = new javax.swing.JButton();
    jScrollPane1 = new javax.swing.JScrollPane();
    jtResultado = new javax.swing.JTable();
    jPanel1 = new javax.swing.JPanel();
    jbBuscarPedido = new javax.swing.JButton();
    jbExcluir = new javax.swing.JButton();
    jbFinalizar = new javax.swing.JButton();
    jbLimpar = new javax.swing.JButton();
    jLabel6 = new javax.swing.JLabel();
    jtfId = new javax.swing.JTextField();
    jLabel7 = new javax.swing.JLabel();
    jtfData = new javax.swing.JTextField();
    jLabel9 = new javax.swing.JLabel();
    jtfIdCliente = new javax.swing.JTextField();
    jLabel10 = new javax.swing.JLabel();
    jtfIdVendedor = new javax.swing.JTextField();
    jlbTotal = new javax.swing.JLabel();
    jLabel11 = new javax.swing.JLabel();

    jButton5.setText("jButton5");

    jMenuItem1.setLabel("Excluir");
    jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItem1ActionPerformed(evt);
        }
    });
    popExcluir.add(jMenuItem1);

    setTitle("Orçamento PWA Orçar");

    jLabel1.setText("Cliente:");

    jLabel2.setText("Vendedor:");

    jLabel3.setText("Produto:");

    jLabel4.setText("Quantidade:");

    jtfQuantidade.setText("0");
    jtfQuantidade.addFocusListener(new java.awt.event.FocusAdapter() {
        public void focusLost(java.awt.event.FocusEvent evt) {
            jtfQuantidadeFocusLost(evt);
        }
    });

    jbBuscaCliente.setText("Buscar");
    jbBuscaCliente.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jbBuscaClienteActionPerformed(evt);
        }
    });

    jbBuscaVendedor.setText("Buscar");
    jbBuscaVendedor.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jbBuscaVendedorActionPerformed(evt);
        }
    });

    jLabel5.setText("Desconto:");

    jtfDesconto.setText("0");
    jtfDesconto.addFocusListener(new java.awt.event.FocusAdapter() {
        public void focusLost(java.awt.event.FocusEvent evt) {
            jtfDescontoFocusLost(evt);
        }
    });

    jbBuscaItem.setText("Buscar");
    jbBuscaItem.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jbBuscaItemActionPerformed(evt);
        }
    });

    jbAdicionar.setText("Adicionar");
    jbAdicionar.addFocusListener(new java.awt.event.FocusAdapter() {
        public void focusLost(java.awt.event.FocusEvent evt) {
            jbAdicionarFocusLost(evt);
        }
    });
    jbAdicionar.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jbAdicionarActionPerformed(evt);
        }
    });

    jtResultado.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
            {null, null, null, null},
            {null, null, null, null},
            {null, null, null, null},
            {null, null, null, null}
        },
        new String [] {
            "Title 1", "Title 2", "Title 3", "Title 4"
        }
    ));
    jtResultado.setComponentPopupMenu(popExcluir);
    jScrollPane1.setViewportView(jtResultado);

    jPanel1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

    jbBuscarPedido.setText("Buscar");
    jbBuscarPedido.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jbBuscarPedidoActionPerformed(evt);
        }
    });

    jbExcluir.setText("Excluir");
    jbExcluir.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jbExcluirActionPerformed(evt);
        }
    });

    jbFinalizar.setText("Gerar Orçamento");
    jbFinalizar.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jbFinalizarActionPerformed(evt);
        }
    });

    jbLimpar.setText("Limpar");
    jbLimpar.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jbLimparActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
        jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(jPanel1Layout.createSequentialGroup()
            .addContainerGap()
            .addComponent(jbFinalizar)
            .addGap(28, 28, 28)
            .addComponent(jbLimpar, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(50, 50, 50)
            .addComponent(jbExcluir, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 504, Short.MAX_VALUE)
            .addComponent(jbBuscarPedido, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addContainerGap())
    );
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(jPanel1Layout.createSequentialGroup()
            .addGap(22, 22, 22)
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jbFinalizar, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jbLimpar, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jbExcluir, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jbBuscarPedido, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addContainerGap(23, Short.MAX_VALUE))
    );

    jLabel6.setText("ID:");

    jtfId.setText("0");
    jtfId.addFocusListener(new java.awt.event.FocusAdapter() {
        public void focusLost(java.awt.event.FocusEvent evt) {
            jtfIdFocusLost(evt);
        }
    });

    jLabel7.setText("Data:");

    jLabel9.setText("ID:");

    jLabel10.setText("ID:");

    jlbTotal.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
    jlbTotal.setText("Total: R$0,00");

    jLabel11.setText("Pedido Itens");

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jLabel1)
                        .addComponent(jLabel6))
                    .addGap(18, 18, 18)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(jtfId, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addComponent(jLabel7)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtfData, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(0, 0, Short.MAX_VALUE))
                        .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jtfVendedor)
                                .addComponent(jtfCliente)
                                .addGroup(layout.createSequentialGroup()
                                    .addGap(0, 0, Short.MAX_VALUE)
                                    .addComponent(jbBuscaItem)))
                            .addGap(18, 18, 18)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addGroup(layout.createSequentialGroup()
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.TRAILING)
                                        .addComponent(jLabel10, javax.swing.GroupLayout.Alignment.TRAILING))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(jtfIdVendedor, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 316, Short.MAX_VALUE)
                                        .addComponent(jtfIdCliente, javax.swing.GroupLayout.Alignment.TRAILING)))
                                .addGroup(layout.createSequentialGroup()
                                    .addComponent(jLabel5)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jtfDesconto, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE)
                                    .addComponent(jLabel4)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jtfQuantidade, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(26, 26, 26)
                                    .addComponent(jbAdicionar)))))
                    .addGap(55, 55, 55)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jbBuscaCliente)
                        .addComponent(jbBuscaVendedor))
                    .addGap(32, 32, 32))
                .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING))
                    .addContainerGap())
                .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jlbTotal)
                        .addComponent(jLabel11)
                        .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel2)
                                .addComponent(jLabel3))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jtfItem, javax.swing.GroupLayout.PREFERRED_SIZE, 347, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabel6)
                .addComponent(jtfId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jLabel7)
                .addComponent(jtfData, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabel1)
                .addComponent(jtfCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jbBuscaCliente)
                .addComponent(jLabel9)
                .addComponent(jtfIdCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabel2)
                .addComponent(jtfVendedor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jbBuscaVendedor)
                .addComponent(jLabel10)
                .addComponent(jtfIdVendedor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jtfItem, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jLabel3)
                .addComponent(jLabel4)
                .addComponent(jtfQuantidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jbAdicionar)
                .addComponent(jbBuscaItem)
                .addComponent(jtfDesconto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jLabel5))
            .addGap(18, 18, 18)
            .addComponent(jLabel11)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 35, Short.MAX_VALUE)
            .addComponent(jlbTotal)
            .addGap(27, 27, 27)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addContainerGap())
    );

    pack();
}// </editor-fold>                        

private void jbFinalizarActionPerformed(java.awt.event.ActionEvent evt) {                                            
    try {
        PedidoDao.gravaPedido(getPedidoFromTela());
    } catch (ParseException ex) {
        Logger.getLogger(CadPedido.class.getName()).log(Level.SEVERE, null, ex);
    }
    JOptionPane.showMessageDialog(this, "Pedido Salvo com Sucesso");
    jbLimparActionPerformed(null);
}