I am trying to design a simple gui interface. The frame consists of a main panel which contains another four panels "Staff Details", "Job Details" "Photo" and buttons. The output is as follows:
I used gridLayout for all the panels except for the "buttons panel" which has borderLayout.
Now I want to reduce the height of the bottom two panels so it won't have the extra space. How do I do that?
Here is the code for the "photo" panel and "button" panel. Both panels now have flow layout.
photoPanel.setPreferredSize(new Dimension(300,70));
photoPanel.add(browsebx);
photoPanel.add(browseBtn);
btnPanel.setPreferredSize(new Dimension(300,70));
btnPanel.add(addBtn);
btnPanel.add(editBtn);
btnPanel.add(deleteBtn);
btnPanel.add(cancelBtn);