Inoltre il metodo show() è deprecato, da sostituire con frame.setVisible(true);