Hi,
I am a new
Java Programmer.could you help me in resolving this.
I am trying to created a JPanel withing a main JPanel. For the nested one, i have included Grid Layout and i am trying to add components to it dynamically.
i.e i have added a combo box to the nested JPanel and based on the selection it makes, i want to add few more components to the same JPanel.
For this i created some code, but the problem is irrespective of the size, i mention for the combo box, it takes up the whole size of the JPanel and hence, the other components which needs to get added to the panel, based upon the selection of the combo box, are not getting added to the JPanel.
I searched through the net and understood that this has something to do with the layout manager only. But i am unable to debug this out..
Please help me with this
Note - while running the code, please enter the number of rows to be added as 1, since ive not yet handled multiple rows
Also, i would like to include multiple such panels arranged vertically growing downwards. Could someone suggest some idea for that.
The constraint in this case is, at first ill go and add 10 rows and then later depending on my requirement, ill go and delete a particular row in the middle (say 5th) using the delete button, which would be provided at last of every row, so the rows must get rearranged in order to fill the gap made by the removal on the middle row. Please help me with this too..
Thanks in advance