package jp.itohiro.intellij.sample;

import com.intellij.openapi.project.Project;
import com.intellij.openapi.wm.ToolWindow;
import com.intellij.openapi.wm.ToolWindowFactory;

import javax.swing.*;

public class SearchWindow implements ToolWindowFactory{
    private JTextField textField1;
    private JLabel searchLabel;
    private JPanel panel;
    private JTable table1;

    @Override
    public void createToolWindowContent(Project project, ToolWindow toolWindow) {
        JComponent parent = toolWindow.getComponent();
        parent.add(this.panel);
    }
}

@@ -190,16 +190,126 @@
 swing.*;
+%0Aimport javax.swing.table.DefaultTableModel;%0Aimport java.awt.event.KeyAdapter;%0Aimport java.awt.event.KeyEvent;
 %0A%0Apublic
@@ -482,189 +482,1048 @@
 e1;%0A
-%0A    @Override%0A    public void createToolWindowContent(Project project, ToolWindow toolWindow) %7B%0A        JComponent parent = toolWindow.getComponent();%0A        parent.add(this.panel
+    private DefaultTableModel tableModel;%0A    private String columns%5B%5D = %7B%0A            %22Site%22, %22Title%22, %22Contents%22, %22Date%22%0A    %7D;%0A    public SearchWindow() %7B%0A        textField1.addKeyListener(new KeyAdapter() %7B%0A            @Override%0A            public void keyPressed(KeyEvent e) %7B%0A                if (e.getKeyCode() == KeyEvent.VK_ENTER) %7B%0A                    search(textField1.getText());%0A                %7D%0A            %7D%0A        %7D);%0A%0A        tableModel = new DefaultTableModel(columns, 0);%0A        table1.setModel(tableModel);%0A    %7D%0A%0A    @Override%0A    public void createToolWindowContent(Project project, ToolWindow toolWindow) %7B%0A        JComponent parent = toolWindow.getComponent();%0A        parent.add(this.panel);%0A    %7D%0A%0A    private void search(String text) %7B%0A        tableModel.addRow(new String%5B%5D%7B%22Qiita%22, %22How to implement %22 + text, %22Content XXXX%22, %222015-08-31 23:36%22%7D);%0A        tableModel.addRow(new String%5B%5D%7B%22Stack Overflow%22, %22How to develop %22 + text, %22Content YYYY%22, %222015-08-31 23:38%22%7D);%0A        tableModel.fireTableDataChanged(
 );%0A 

Add key listener in search box and invoke dummy search method