Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.net.URL;

import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;

public class Main {
    public static void showDialogWhitImage(URL pathuRL) {

        JPanel panel = new JPanel();
        JLabel jLabel = new JLabel();
        jLabel.setIcon(new javax.swing.ImageIcon(pathuRL)); // NOI18N
        panel.add(jLabel);
        JOptionPane.showMessageDialog(null, panel);
        jLabel = null;
        panel = null;
    }
}