What layout accepts percentages instead of values in swing?
I need to create frame content based on their percentage of visual space they need. For example 20% for panel1,80% for panel2. what layout does this kind of layout management? in reduced form GridBagLayout , but with success for your requirement 80% - 20% import java.awt.*; import javax.swing.*; import javax.swing.border.*; public class BorderPanels extends JFrame { private static final long serialVersionUID = 1L; public BorderPanels() { setLayout(new GridBagLayout());// set LayoutManager GridBagConstraints gbc = new GridBagConstraints(); JPanel panel1 = new JPanel(); Border eBorder =