private void openImageUrl() {
        String url = JOptionPane.showInputDialog(this, "Enter image URL", "http://", JOptionPane.QUESTION_MESSAGE);
        if (url == null || url.trim().equals("")) {
            return;
        }

        String imageName = getImageNameForUrl(url);
        String pageName = getPageName();
        if (imageName == null || pageName == null) {
            return;
        }
        try {
            BufferedImage image = ImageIO.read(new URL(url));
            if (image == null) {
                JOptionPane.showMessageDialog(this, "Error: Could not load image");
                return;
            }
            openImage(image, pageName, imageName);
        } catch (IOException e) {
            JOptionPane.showMessageDialog(this, "Error: " + e.getMessage());
            e.printStackTrace();
        }
    }