1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
FormLayout layout = new FormLayout("right:pref, 3dlu, pref, 7dlu, right:pref, 3dlu, pref", // colonnes
"p, 3dlu, p, 9dlu, p, 3dlu, p, 3dlu," + // lignes
"p, 9dlu, fill:default, 3dlu, p"); // lignes
PanelBuilder builder = new PanelBuilder(layout);
builder.setDefaultDialogBorder();
CellConstraints cc = new CellConstraints();
dataList = new JList(data);
dataList.setFixedCellWidth(50);
dataList.setVisibleRowCount(4);
JScrollPane scrollPane = new JScrollPane(dataList);
builder.add(scrollPane);
builder.add(dataList, cc.xy(1, 7)); |
Partager