private void openAddMediaDialog(Node node, ArrayList<Link> prevLinks, final int startOrLink, Link currentLink) {
        if (startOrLink != 1 || !node.getStart()) {
            // Create startLink
            if (currentLink == null) {
                currentLink = new Link(null, null, node, map.getStory().getLinkCounter());
            }
            // Show popup window for adding media to the startnode (Link)
            final AddMedia popup = new AddMedia(main, map, prevLinks, currentLink, startOrLink);
            popup.setVisible(true);

            // Add window listener to the popup dialog window, so we
            // can get the added MediaItems in the right order
            popup.addWindowListener(new WindowAdapter() {
                /**
                 * Window closed event
                 */
                @Override
                public void windowClosed(WindowEvent we) {

                    // Get all added media items in the right order!
                    ArrayList<MediaItem> items = popup.getAddedItems();

                    // User saved link properties
                    if (popup.isClosedBySave()) {

                        // If user did not add any media to the link,
                        if (items.isEmpty()) {

                            // then show popup.
                            JOptionPane.showMessageDialog(popup,
                                    "You didn't add any media to this Link." + "\n"
                                    + "You can still add media to this Link by clicking on this Link!", // message
                                    "Info", // title
                                    JOptionPane.INFORMATION_MESSAGE);
                        }

                    } else {
                        // User closed window and did NOT save anything.
                        if (startOrLink == 0) {
                            linkPainter.removeLastLink();
                        }
                    }
                }
            });

        } else {
            JOptionPane.showMessageDialog(null, "This node already has a start.");
        }
    }