add method : rescalePeviewPanel() this is used when we change the size of the panel
add some forgotten line in rescalePreviewPanel