I have written a java gui code for many options available on it. the gui is also set visible true but it doesn\'t show until I pick its border and drag them to resize the gu
frame.setVisible(true);
This Statement should be invoked in the last of adding other components to the Frame.
frame.setVisible(true) ;
The above statement should be invoked AFTER all the components have been added to the frame. So it should be the last statement in your method.
Also, you should be invoking:
frame.pack();
instead of setSize(), before making the frame visible so all the components are displayed at their preferred size.