private void initPopupMenu(){
    mainPopupMenu = new JPopupMenu();
    ImageIcon itemCopyIcon = new ImageIcon(Main.ICO_PATH + "page_copy.png");
    JMenuItem itemCopy = new JMenuItem("  Copy    ", itemCopyIcon);
    itemCopy.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseReleased(MouseEvent e) {
            copyToClipboard(getSelectedText());
        }
    });
    ImageIcon itemCutIcon = new ImageIcon(Main.ICO_PATH + "cut.png");
    JMenuItem itemCut = new JMenuItem("  Cut    ", itemCutIcon);
    itemCut.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseReleased(MouseEvent e) {
            cutText(getSelectedText());
        }
    });
    ImageIcon itemPasteIcon = new ImageIcon(Main.ICO_PATH + "page_paste.png");
    JMenuItem itemPaste = new JMenuItem("  Past    ", itemPasteIcon);
    itemPaste.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseReleased(MouseEvent e) {
            pasteText();
        }
    });

    mainPopupMenu.add(itemCopy);
    mainPopupMenu.add(itemCut);
    mainPopupMenu.add(itemPaste);

}