Hello everyone,
Although my last thread received no replies

, this seems to be the only NetBeans forum that receives replies, so I will continue to seek help here

. What I'm looking to do is to add a component, say a textfield or something, manually to another component, such as a JPanel, for every entry in an array.
What I did was customize the code for a jPanel that I added, and supplemented the code with this:
for (int i = 0; i < array.length; i++) {
javax.swing.JButton blah = new javax.swing.JButton();
jPanel2.add(blah, i);
}
The add method's information box mentioned that the container that the component is added to may need to be validated after the add. I've tried also including jPanel2.validate(), but to no avail. Regardless of whether the for loop is there or not, the add method seems not to work. When I add a component using the NetBeans gui, the code that is generated is not jPanel2.add, but rather jPanel2Layout.addComponent etc. Yet there is no way to manually change that code. Frustrating!!!