Implementing Jpanel-swapping mechanism