You may want to add a LayoutManager to your window. NetBeans has support for it. Right-click inside your window in NetBeans, hover “Set Layout” and select a proper LayoutManager.
I always use GridBagLayout. Here is a tutorial: http://docs.oracle.com/javase/tutorial/uiswing/layout/gridbag.html
Good Luck.
10
solved Netbeans desktop application of teacher attendance [closed]