001 package nl.cwi.sen1.gui.plugin; 002 003 import java.awt.BorderLayout; 004 005 import javax.swing.JPanel; 006 import javax.swing.JScrollPane; 007 import javax.swing.JTable; 008 009 import nl.cwi.sen1.gui.plugin.data.ModuledetailsTableModel; 010 011 public class ModuledetailsPanel extends JPanel { 012 private JTable table; 013 014 private ModuledetailsTableModel model; 015 016 public ModuledetailsPanel() { 017 super(new BorderLayout()); 018 String[] columnNames = { "Namespace", "Key", "Value" }; 019 020 model = new ModuledetailsTableModel(columnNames); 021 table = new JTable(model); 022 023 JScrollPane scrollPane = new JScrollPane(table); 024 add(scrollPane, BorderLayout.CENTER); 025 } 026 027 public void setDetails(String namespace, String key, String value) { 028 model.setDetails(namespace, key, value); 029 } 030 }