Originally posted by Justin Fox:
easier way is to just setLayout(null) setBounds(x,y) on your components with in your jpanel.
Easier? Yes. Good? NO!
Unfortunately, Prashanth, GUI layouts
are tedious. Sometimes tedious and development go hand in hand. I honestly don't know of a better way to do what you are requesting. When I've had to lay repetitive panels on panels I usually create some sort of factory class or methods to generate the nasty bits over and over. So I might have a method that takes 1 or more components and returns my blue JPanel with these 2 components on them. So the code you write over and over becomes:
JPanel panel = createBluePanel(someLabel, someTextField);
And createBluePanel does the tedious work. I would like to point out that there are much better layout managers than what Swing ships with. JGoodies Form Layout for example. Might see if this takes some of the tedious work out of it.
[ April 03, 2007: Message edited by: Gregg Bolinger ]