JXPanel pc1 = new JXPanel(new BorderLayout());
JXPanel pf = new JXPanel();
// pf.setLayout(new DialogLayout(20, 5));
pf.setBorder(new EmptyBorder(8, 5, 8, 0));
pf.add(new JXLabel("Buscar:"));
txtBuscar1 = new JTextField();
txtBuscar1.setPreferredSize(new Dimension(100, txtBuscar1.getPreferredSize().height));
docBusqueda = txtBuscar1.getDocument();
pf.add(txtBuscar1);
pc1.add(pf, BorderLayout.CENTER);
JXPanel po = new JXPanel(new GridLayout(2, 2, 8, 2));
po.setBorder(new TitledBorder(new EtchedBorder(), "Options"));
JCheckBox chkWord = new JCheckBox("Palabra completa");
chkWord.setMnemonic('p');
m_modelWord = chkWord.getModel();
po.add(chkWord);
ButtonGroup bg = new ButtonGroup();
JRadioButton rdUp = new JRadioButton("Hacia arriba");
rdUp.setMnemonic('r');
m_modelUp = rdUp.getModel();
bg.add(rdUp);
po.add(rdUp);
JCheckBox chkCase = new JCheckBox("Contiene");
chkCase.setMnemonic('c');
m_modelCase = chkCase.getModel();
po.add(chkCase);
JRadioButton rdDown = new JRadioButton("Hacia abajo", true);
rdDown.setMnemonic('b');
m_modelDown = rdDown.getModel();
bg.add(rdDown);
po.add(rdDown);
pc1.add(po, BorderLayout.SOUTH);
p1.add(pc1, BorderLayout.CENTER);
JXPanel p01 = new JXPanel(new FlowLayout());
JXPanel p = new JXPanel(new GridLayout(2, 1, 2, 8));
ActionListener findAction = new ActionListener() {
public void actionPerformed(ActionEvent e) {
findNext(false, true);
}
};
JButton btFind = new JButton("Siguiente");
btFind.addActionListener(findAction);
btFind.setMnemonic('S');
p.add(btFind);
ActionListener closeAction = new ActionListener() {
public void actionPerformed(ActionEvent e) {
setVisible(false);
}
};
JButton btClose = new JButton("Cerrar");
btClose.addActionListener(closeAction);
btClose.setDefaultCapable(true);
p.add(btClose);
p01.add(p);
p1.add(p01, BorderLayout.EAST);
tabbedPaneBuscarReemplazar.addTab("Buscar", p1);
// "Replace" panel
JXPanel p2 = new JXPanel(new BorderLayout());
JXPanel pc2 = new JXPanel(new BorderLayout());
JXPanel pc = new JXPanel();
// pc.setLayout(new BoxLayout(20, 5));
pc.setBorder(new EmptyBorder(8, 5, 8, 0));
pc.add(new JXLabel("Buscar:"));
txtBuscar2 = new JTextField();
txtBuscar2.setDocument(docBusqueda);
txtBuscar2.setPreferredSize(new Dimension(100, txtBuscar2.getPreferredSize().height));
pc.add(txtBuscar2);
pc.add(new JXLabel("Reemplazar:"));
JTextField txtReplace = new JTextField();
txtReplace.setPreferredSize(new Dimension(100, txtReplace.getPreferredSize().height));
docReemplazar = txtReplace.getDocument();
pc.add(txtReplace);
pc2.add(pc, BorderLayout.CENTER);