You need to create a jframe and add the jpanel component to it. jpanel cannot be displayed on its own.
so you can modify the code as

JFrame jframe1 = new JFrame("NewFrame");...