selectionPanel.setTrainingPanel(networkPanel);
    private GlyphTrainer ()    {        if (standAlone) {            // UI Look and Feel            UILookAndFeel.setUI(null);            JFrame.setDefaultLookAndFeelDecorated(true);        }        frame = new JFrame();        frame.setTitle(frameTitle);        // Listener on remaining error        ChangeListener errorListener = new ChangeListener() {            public void stateChanged (ChangeEvent e)            {                frame.setTitle(                    String.format(                        "%.5f - %s",                        networkPanel.getBestError(),                        frameTitle));            }        };        // Create the three companions        selectionPanel = new SelectionPanel(task, standardWidth);        networkPanel = new NetworkPanel(            task,            standardWidth,            errorListener,            selectionPanel);        validationPanel = new ValidationPanel(            task,            standardWidth,            GlyphNetwork.getInstance(),            selectionPanel,            networkPanel);        frame.add(createGlobalPanel());        // Initial state        task.setActivity(Task.Activity.INACTIVE);        // Specific ending if stand alone        if (standAlone) {            frame.addWindowListener(                new WindowAdapter() {                        public void windowClosing (WindowEvent e)                        {                            // Store latest constant values                            ConstantManager.storeResource();                            // That's all folks !                            System.exit(0);                        }                    });        }        // Differ realization        EventQueue.invokeLater(            new Runnable() {                    public void run ()                    {                        frame.pack();                        frame.setVisible(true);                    }                });    }