posted 16 years ago
I am trying to add child JPanel dynamically in parent JPanel using grid layout in JFrame.
When ever i add componenet, it comes in the center only.Then i set the weighty=1. Now first compoenet is comming on top, rest all are added at the bottom.
One more thing, All the child elmenet should be of same size, and it should not cover the entire remaining area. How can i set a constraints, so that each child panel are added one after the other from top to bottom?Please help. It is really urgent.
Thanks in advance !