List of usage examples for javax.swing.text Document addDocumentListener
public void addDocumentListener(DocumentListener listener);
From source file:org.richie.codeGen.ui.CodeGenMainUI.java
public JPanel getWestPanel() { if (westPanel == null) { westPanel = new JPanel(); westPanel.setLayout(new BorderLayout()); JLabel filterLable = new JLabel(""); JPanel filterPanel = new JPanel(); filterPanel.add(filterLable);//from w w w . ja v a2 s.c om filterField = new JTextField(15); Document doc = filterField.getDocument(); doc.addDocumentListener(new TextDocumentListener()); filterPanel.add(filterField); filterPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); westPanel.setPreferredSize(new Dimension(200, 650));// ?,JPanel westPanel.add(filterPanel, BorderLayout.NORTH); westPanel.add(getTreepanel(), BorderLayout.CENTER); } return westPanel; }