i get the following error while running a packet sniffer code:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at ps.MainGUI.startbtnActionPerformed(MainGUI.java:399)
at ps.MainGUI.access$000(MainGUI.java:26)
what could be the reason??the program code is give below :
// TODO add your handling code here:
startPacketbtn();
ps.startUpdating();
and
public class MainGUI extends javax.swing.JFrame {
public DefaultTableModel dtmPacket = new DefaultTableModel();
PSCaptor ps;
/** Creates new form MainGUI */
public MainGUI(int bufsize,boolean mode,int deviceno) {
initComponents();
System.out.println("HERE");