container.setLayout(new SBoxLayout(SBoxLayout.VERTICAL));  dragSource.setDragEnabled(true); dragLabel.setDragEnabled(true);  dropTarget.addComponentDropListener(new SComponentDropListener() {
final SPanel puzzleContainer = new SPanel(new SBoxLayout(SBoxLayout.VERTICAL)); final SPanel controlContainer = new SPanel(new SBoxLayout(SBoxLayout.VERTICAL)); container.setLayout(new SBoxLayout(SBoxLayout.HORIZONTAL));  final SButton resetButton = new SButton("Reset"); resetButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { resetPuzzle(); } });  for (int i = 0; i < dragIcons.length; i++) { dragIcons[i].setDragEnabled(true); dragIcons[i].setPreferredSize(new SDimension(30,30)); }  for (int i = 0; i < dropIcons.length; i++) { final int position = i; final SDropLabel dropIcon = dropIcons[i]; dropIcon.setPreferredSize(new SDimension(100,100)); dropIcon.addComponentDropListener(new SComponentDropListener() {
    protected SComponent createExample() {        final SPanel container = new SPanel();        container.setLayout(new SBoxLayout(SBoxLayout.VERTICAL));        // initialize the drag and drop components        dragSource.setDragEnabled(true);        dragLabel.setDragEnabled(true);        // for dropTargets, adding a Listener is enough        dropTarget.addComponentDropListener(new SComponentDropListener() {            public boolean handleDrop(SComponent dragSource) {                boolean result = false;                if (dragSource instanceof STextComponent) {                    // allow drop                    dropTarget.setText(((STextComponent)dragSource).getText());                    result = true;                }                if (dragSource instanceof SLabel) {                    // allow drop                    dropTarget.setText(((SLabel)dragSource).getText());                    result = true;                }                container.add(new SLabel("Drag and Drop Action triggered from " + dragSource.getClass().getName()));                return result;            }                    });        // add the components to the container        container.add(dragSource);        container.add(normalField);        container.add(dropTarget);        container.add(dragLabel);                return container;    }