1 package SnowMailClient.view.traceView; 2 3 import java.awt.*; 4 import javax.swing.*; 5 import javax.swing.event.*; 6 import java.util.*; 7 8 import SnowMailClient.model.*; 9 import snow.utils.gui.*; 10 import SnowMailClient.Language.Language; 11 12 25 public class TraceViewDialog extends JDialog 26 { 27 Header header; 28 JTable table = new JTable(); 29 TraceModel traceModel = new TraceModel(); 30 31 public TraceViewDialog(JFrame ref, Header header) 32 { 33 super(ref, Language.translate("Trace"), true); 34 this.header = header; 35 this.getContentPane().setLayout(new BorderLayout()); 36 this.getContentPane().add(new JScrollPane(table), BorderLayout.CENTER); 37 38 Vector<HeaderEntry> hes = header.getAllEntries("Received"); 39 for(HeaderEntry he: hes) 40 { 41 traceModel.addItem(new TraceItem(he.getValue())); 42 } 43 44 table.setModel(traceModel); 45 46 CloseControlPanel ccp = new CloseControlPanel(this, false, false, Language.translate("Close")); 47 this.getContentPane().add(ccp, BorderLayout.SOUTH); 48 49 setSize(1000,300); 50 setLocationRelativeTo(null); 51 52 setVisible(true); 53 } 55 56 57 58 59 } | Popular Tags |