Sorry for making another thread ( I actually solved my other one).
but this section of code I really need help on:
how do I get rid of the non-static method error? I searched but came up empty handed. It is really important I do those steps on shut down.
but this section of code I really need help on:
Code:
public void shutDown()
{
out.println("close");
out.flush();
System.exit(0);
}
public static void main(String[] args)
{
ClientGUI mainWindow = new ClientGUI();
mainWindow.pack();
mainWindow.addWindowListener(new WindowAdapter()
{public void windowClosing(WindowEvent e)
{shutDown();}
});
mainWindow.setResizable(false);
mainWindow.setVisible(true);
}
Comment