private JButton createButton() {
        JButton but = new JButton("     ");
        but.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                cell.open();
            }
        });

        but.addMouseListener(new MouseListener() {
            private boolean pressed = false;

            @Override
            public void mouseClicked(MouseEvent e) {
            }

            @Override
            public void mousePressed(MouseEvent e) {
                if (SwingUtilities.isRightMouseButton(e)) {
                    if (!cell.mark()){
                        marked = false;
                        button.setIcon(null);
                        image = null;
                    }
                } else {
                    pressed = true;
                    Action act = factory.createAction("CellViewerSelected");
                    if (act != null) act.execute();
                }
            }

            @Override
            public void mouseReleased(MouseEvent e) {
                pressed = false;
                Action act = factory.createAction("CellViewerUnselected");
                if (act != null) act.execute();
            }

            @Override
            public void mouseEntered(MouseEvent e) {
                Action act = null;
                if (pressed) act = factory.createAction("CellViewerSelected");
                if (act != null) act.execute();
            }

            @Override
            public void mouseExited(MouseEvent e) {
                Action act = factory.createAction("CellViewerUnselected");
                if (act != null) act.execute();
            }
        });
        return but;
    }