Changed createAndPrint method to createAndShow