How to handle Group Layout Manually without using Layout manager.
I'm dealing with this piece of code
how to set sizes, locations etc manually i'm new to these layouts.
GroupLayout jPanel2Layout = new GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(GroupLayout.Alig nment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel2Layout.createParallelGroup(GroupL ayout.Alignment.LEADING)
.addGroup(GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addComponent(Add)
.addGap(54, 54, 54))
.addGroup(GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addComponent(search)
.addGap(24, 24, 24))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(Info)
.addPreferredGap(LayoutStyle.ComponentPlacement.RE LATED, 89, Short.MAX_VALUE))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(Locate)
.addPreferredGap(LayoutStyle.ComponentPlacement.RE LATED, 99, GroupLayout.PREFERRED_SIZE))
.addGroup(GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addGap(28, 28, 28)
.addComponent(Add, GroupLayout.DEFAULT_SIZE, 122, Short.MAX_VALUE)
.addGap(14, 14, 14))
.addGroup(GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addGap(28, 28, 28)
.addComponent(search, GroupLayout.DEFAULT_SIZE, 136, Short.MAX_VALUE))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(view)
.addPreferredGap(LayoutStyle.ComponentPlacement.RE LATED, 89, Short.MAX_VALUE))
.addGroup(GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(GroupL ayout.Alignment.LEADING)
.addComponent(Of)
.addComponent(On))
.addGap(31, 31, 31)))
.addContainerGap())
);