Fixed layout list + tab
All checks were successful
flavien's git/Projet_JAVA_P2P_STRI2A/pipeline/pr-master This commit looks good

This commit is contained in:
js 2020-04-03 14:23:04 +02:00
parent 18bd90b362
commit ee35381837
4 changed files with 68 additions and 71 deletions

View File

@ -19,7 +19,6 @@ public class downloadSelection extends JPanel {
public downloadSelection(String[] listFilesToDownload){ public downloadSelection(String[] listFilesToDownload){
JPanel p1 = new JPanel(); JPanel p1 = new JPanel();
JPanel p2 = new JPanel();
JPanel p3 = new JPanel(); JPanel p3 = new JPanel();
FlowLayout layout = new FlowLayout(); FlowLayout layout = new FlowLayout();
this.listFilesToDownload = listFilesToDownload; this.listFilesToDownload = listFilesToDownload;
@ -27,16 +26,14 @@ public class downloadSelection extends JPanel {
this.label1 = new JLabel("List of files you can download: "); this.label1 = new JLabel("List of files you can download: ");
this.downloadButton = new JButton("download"); this.downloadButton = new JButton("download");
this.list1.setSelectedIndex(0); this.list1.setSelectedIndex(0);
p1.setLayout(layout); p1.setLayout(new GridLayout(1, 2));
p2.setLayout(layout);
p3.setLayout(layout); p3.setLayout(layout);
this.setLayout(new GridLayout(3, 1)); this.setLayout(new GridLayout(2, 1));
p1.add(label1); p1.add(label1);
p2.add(list1); p1.add(list1);
p3.add(downloadButton); p3.add(downloadButton);
this.add(p1, BorderLayout.NORTH); this.add(p1);
this.add(p2, BorderLayout.CENTER); this.add(p3);
this.add(p3, BorderLayout.SOUTH);
setVisible(true); setVisible(true);
} }