by Dinesh Thakur

 

import java.awt.*;

import javax.swing.*;
import java.awt.event.*;
public class JavaExampleInternalDialogPaneInJApplet extends JApplet implements ActionListener
  {
    private JButton BtnShw = new JButton("Show Internal Dialog");
    JDesktopPane DskTopPn = new JDesktopPane();
    public void init()
      {
        Container Cntnr = getContentPane();
        Cntnr.add(BtnShw, BorderLayout.SOUTH);
        Cntnr.add(DskTopPn);
        BtnShw.addActionListener(this);
      }
        public void actionPerformed(ActionEvent e1)
        {
           JOptionPane.showInternalMessageDialog(DskTopPn,"Welcome To java!","Dialog",JOptionPane.INFORMATION_MESSAGE);
        }
  }
/*<APPLET CODE =JavaExampleInternalDialogPaneInJApplet.class  WIDTH =360  HEIGHT=300 ></APPLET>*/
showInternalMessageDialog Example in Java