```
if (credits >= 30) {
pnlSuccess.setVisible(true);
pnlpass.setVisible(false);
busdocRef.update("onbus", FieldValue.arrayUnion(txtRFID.getText()));
busdocRef.update("passengers", FieldValue.increment(1));
docRef.update("travelling", Data.busid);
docRef.update("slat", slat);
docRef.update("slon", slon);
txtRFID.setText("");
Thread.sleep(2000);
pnlSuccess.setVisible(false);
pnlpass.setVisible(true);
txtRFID.requestFocus();
}
```
This si the code But the pass pnl do not hide and the success panel do not show up