I have three JButtons, two JLabels and one JTextField in my program and a JPanel with FlowLayout. I want to arrange three buttons at the beginning of the JPanel and the rest at the end of the JPanel. I need space between the three buttons and the last three components, but the code doesn't work. Can anyone help me?
This is the code:
JPanel panelMenu=new Jpanel(new FlowLayout())
panelMenu.add ( btnOpen );
panelMenu.add ( lblPage );
panelMenu.add ( txtCurrentPage );
panelMenu.add ( lblTotalPage );
panelMenu.add ( btnBackword );
panelMenu.add ( btnNext );
getContentPanel.add(panelMenu);