panel.update() just replaces the text but when i pass any component object to this update it not replacing the panel content