public pesanan() {
        initComponents();
        operator.setText("Operator : "+main.username);
        tbldetail.setModel(tblModel);
        loadMakanan();
        nopesanan.getDocument().addDocumentListener(new DocumentListener() {

            @Override
            public void insertUpdate(DocumentEvent e) {
              if (nopesanan.getText().length()>0) {
                  cariDetailPesanan(Integer.parseInt(nopesanan.getText()));
              }
            }

            @Override
            public void removeUpdate(DocumentEvent e) {
              if (nopesanan.getText().length()>0) {
                  cariDetailPesanan(Integer.parseInt(nopesanan.getText()));
              }
            }

            @Override
            public void changedUpdate(DocumentEvent e) {
              if (nopesanan.getText().length()>0) {
                  cariDetailPesanan(Integer.parseInt(nopesanan.getText()));
              }
            }
        });
    }