If you are a complete beginner with Java then going straight to netbeans (or eclipse etc) is not a good idea. (1) A full IDE has its own steep learning curve to add on top of the Java learning curve, (2) A full IDE's tools will fix problems for you without you ever getting to understand what the problem was or why the fix worked.
Much better to start with a decent programmer's editor and command line compile/test until you have built up some Java expertise, then look at Netbeans or Eclipse.
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...