1) Open up your terminal (ctrl+alt+t)
2) Run the following command in the terminal:
gsettings reset-recursively org.cinnamon (THIS IS FOR CINNAMON)
gsettings reset-recursively org.mate.panel (THIS IS FOR MATE)
3) Hit Enter
4) Taraa!!! you should have your panel back to their default again.