JFileChooser chooser = new JFileChooser(filePath);
int option = chooser.showOpenDialog(DisplayFrame.this);
if (option == JFileChooser.APPROVE_OPTION) {
filePath = chooser.getSelectedFile().getAbsolutePath();
prefs.put("openFile", filePath);
PcapHandler handler = new PcapHandler();
handler.addListener(new PacketHandlerListener(DisplayFrame.this));
handler.addFile(filePath);
handler.run();
}
}
};
Action prePacket = new AbstractAction("样例") {