super();
setLayout(new BorderLayout());
JPanel p = new JPanel();
p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));
ConfigList configList;
try {
configList = Bridge.listConfig();
rows = new Row[configList.size()];
for(int i = 0; i < rows.length; i++){
JLabel label = new JLabel(configList.get(i).getLabel());
JComponent comp;
if(configList.get(i) instanceof ConfigMenu){
comp = new JComboBox(((ConfigMenu)configList.get(i)).getChoices());
((JComboBox)comp).setSelectedItem(configList.get(i).getCurrent());
}else{
comp = new JTextField(configList.get(i).getCurrent(), 20);
}
rows[i] = new Row(label, comp, configList.get(i).getName());
p.add(rows[i]);
}
add(new JScrollPane(p), BorderLayout.CENTER);
p = new JPanel();