1 31 package org.objectweb.proactive.examples.binarytree; 32 33 import java.awt.Dimension ; 34 import java.awt.GridLayout ; 35 36 import javax.swing.JPanel ; 37 import javax.swing.JScrollPane ; 38 import javax.swing.JTable ; 39 40 public class SearchPane extends JPanel { 41 private JScrollPane scrollPane; 42 private JTable research; 43 private SearchModel model; 44 45 public SearchPane() { 46 super(false); 47 48 model = new SearchModel(); 49 research = new JTable (model); 50 model.addTableModelListener(research); 51 52 scrollPane = new JScrollPane (research); 53 54 setLayout(new GridLayout (1, 0)); 55 add(scrollPane); 56 57 scrollPane.setPreferredSize(new Dimension (90, 292)); 58 } 59 60 public void updateKeyValue(String [] keyValue) { 61 model.updateKeyValue(keyValue); 62 } 63 64 public void clear() { 65 model.clear(); 66 } 67 } 68 | Popular Tags |