refresh JFrame after adding new Components
You have to revalidate();
the frame. If that doesn't work you also have to call repaint();
Call
revalidate();
repaint();
revalidate
tells the layout manager to reset based on the new component list. This will also trigger a call to repaint.
repaint
is used to tell a component to repaint itself.