Added itemListener to show and hide the console by clicking the checkbox.