getContentPane().setLayout(new BorderLayout()); JPanel panel = new JPanel(new GridLayout(4,1)); panel.add(new JLabel(jEdit.getProperty("search.find"))); panel.add(find); panel.add(new JLabel(jEdit.getProperty("search.replace"))); panel.add(replace); getContentPane().add(BorderLayout.NORTH,panel);
JPanel panel = new JPanel(new GridLayout(2,1)); JPanel panel2 = new JPanel(new BorderLayout()); JLabel label = new JLabel(jEdit.getProperty("search.find")); label.setBorder(new EmptyBorder(12,0,2,0)); panel2.add(BorderLayout.NORTH,label); panel2.add(BorderLayout.CENTER,find); panel.add(panel2); panel2 = new JPanel(new BorderLayout()); label = new JLabel(jEdit.getProperty("search.replace")); label.setBorder(new EmptyBorder(12,0,2,0)); panel2.add(BorderLayout.NORTH,label); panel2.add(BorderLayout.CENTER,replace); panel.add(panel2); content.add(BorderLayout.NORTH,panel);
	public SearchDialog(View view, String defaultFind)	{		super(view,jEdit.getProperty("search.title"),false);		this.view = view;		fileset = SearchAndReplace.getSearchFileSet();		find = new HistoryTextField("find");		find.setText(defaultFind);		replace = new HistoryTextField("replace");		keepDialog = new JCheckBox(jEdit.getProperty(			"search.keepDialog"),jEdit.getBooleanProperty(			"search.keepDialog.toggle"));		ignoreCase = new JCheckBox(jEdit.getProperty(			"search.ignoreCase"),SearchAndReplace.getIgnoreCase());		regexp = new JCheckBox(jEdit.getProperty(			"search.regexp"),SearchAndReplace.getRegexp());		multifile = new JCheckBox();		multifile.setSelected(!(fileset instanceof CurrentBufferSet));		multifileBtn = new JButton(jEdit.getProperty(			"search.multifile"));		findBtn = new JButton(jEdit.getProperty("search.findBtn"));		replaceSelection = new JButton(jEdit.getProperty("search"			+ ".replaceSelection"));		replaceSelection.setMnemonic(jEdit.getProperty("search"			+ ".replaceSelection.mnemonic").charAt(0));		replaceAll = new JButton(jEdit.getProperty("search.replaceAll"));		replaceAll.setMnemonic(jEdit.getProperty("search.replaceAll"			+ ".mnemonic").charAt(0));		cancel = new JButton(jEdit.getProperty("common.cancel"));		getContentPane().setLayout(new BorderLayout());		JPanel panel = new JPanel(new GridLayout(4,1));		panel.add(new JLabel(jEdit.getProperty("search.find")));		panel.add(find);		panel.add(new JLabel(jEdit.getProperty("search.replace")));		panel.add(replace);		getContentPane().add(BorderLayout.NORTH,panel);		panel = new JPanel();		panel.add(keepDialog);		panel.add(ignoreCase);		panel.add(regexp);		panel.add(multifile);		panel.add(multifileBtn);		getContentPane().add(BorderLayout.CENTER,panel);		panel = new JPanel();		panel.add(findBtn);		panel.add(replaceSelection);		panel.add(replaceAll);		panel.add(cancel);		getRootPane().setDefaultButton(findBtn);		getContentPane().add(BorderLayout.SOUTH,panel);		ActionHandler actionListener = new ActionHandler();		multifile.addActionListener(actionListener);		multifileBtn.addActionListener(actionListener);		findBtn.addActionListener(actionListener);		replaceSelection.addActionListener(actionListener);		replaceAll.addActionListener(actionListener);		cancel.addActionListener(actionListener);		GUIUtilities.requestFocus(this,find);		pack();		GUIUtilities.loadGeometry(this,"find");		show();	}