I can't see anywhere that you have constructed any frame or panel in which to add to the frame to then set it frame visible, you can also use a Container...
JPanel p = new JPanel();
p.setLayout(new BoxLayout(p, BoxLayout.PAGE_AXIS));
I would suggest you look at the BoxLayout or JFrames/Panels tutorials so you can see how a basic class is put together as a whole. Oracle uses a container or you can construct a frame and panel to then add the panel to it. Links provided below: