@Override
    public void actionPerformed(ActionEvent e) {
        String xmlString = "";
        //To change body of implemented methods use File | Settings | File Templates.
        for (int i = 0; i < buttons.length; i++) {
            if (e.getSource() == buttons[i]) {
                System.out.println("button is " + buttons[i].getName());
                try {
                    xmlString = client.marshalMoveToXML("black", buttons[i].getName());
                } catch (Exception e1) {
                    System.out.println("xmlString problem");
                }
                try {
                    String reply = client.postToServlet(xmlString);
                    System.out.println(">>" + reply);
                } catch (Exception e1) {
                    e1.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
                }
            }
        }
    }