Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.awt.Dimension;

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

public class Main {
    public static void main(String[] args) {

        JLabel label = new JLabel("java2s.com", JLabel.LEFT);
        label.setPreferredSize(new Dimension(150, 100));

        JOptionPane.showMessageDialog(null, label);

    }
}