bufferList = new JList(jEdit.getBuffers()); ListModel bufferListModel = bufferList.getModel();
DefaultListModel bufferListModel = new DefaultListModel();  Buffer buffer = jEdit.getFirstBuffer(); while(buffer != null) { bufferListModel.addElement(buffer.getPath()); buffer = buffer.getNext(); }  bufferList = new JList(bufferListModel);
	public MultiFileSearchDialog(View view, SearchFileSet fileset)	{		super(view,jEdit.getProperty("search.multifile.title"),true);		ActionHandler actionListener = new ActionHandler();		getContentPane().setLayout(new BorderLayout());		JPanel panel = new JPanel(new GridLayout(4,1));		panel.add(new JLabel(jEdit.getProperty("search.multifile.caption")));		ButtonGroup grp = new ButtonGroup();		panel.add(current = new JRadioButton(jEdit.getProperty(			"search.multifile.current")));		grp.add(current);		current.getModel().setSelected(fileset instanceof CurrentBufferSet);		current.addActionListener(actionListener);		panel.add(all = new JRadioButton(jEdit.getProperty(			"search.multifile.all")));		grp.add(all);		all.getModel().setSelected(fileset instanceof AllBufferSet);		all.addActionListener(actionListener);		panel.add(selected = new JRadioButton(jEdit.getProperty(			"search.multifile.selected")));		grp.add(selected);		selected.getModel().setSelected(fileset instanceof BufferListSet);		selected.addActionListener(actionListener);		getContentPane().add(BorderLayout.NORTH,panel);		bufferList = new JList(jEdit.getBuffers());		ListModel bufferListModel = bufferList.getModel();		bufferList.setSelectionMode(ListSelectionModel			.MULTIPLE_INTERVAL_SELECTION);		if(fileset instanceof BufferListSet)		{			bufferList.setEnabled(true);			Buffer buffer = fileset.getFirstBuffer(view);			do			{				for(int j = 0; j < bufferListModel.getSize(); j++)				{					if(bufferListModel.getElementAt(j) == buffer)						bufferList.addSelectionInterval(j,j);				}			}			while((buffer = buffer.getNext()) != null);		}		else			bufferList.setEnabled(false);		getContentPane().add(BorderLayout.CENTER,			new JScrollPane(bufferList));		panel = new JPanel();		panel.add(ok = new JButton(jEdit.getProperty("common.ok")));		ok.addActionListener(actionListener);		getRootPane().setDefaultButton(ok);		panel.add(cancel = new JButton(jEdit.getProperty("common.cancel")));		cancel.addActionListener(actionListener);		getContentPane().add(BorderLayout.SOUTH,panel);		addKeyListener(new KeyHandler());		setDefaultCloseOperation(DISPOSE_ON_CLOSE);		Dimension screen = getToolkit().getScreenSize();		pack();		setLocation((screen.width - getSize().width) / 2,			(screen.height - getSize().height) / 2);		show();	}