Home » » Message Boxes in Java Program

Message Boxes in Java Program

Message Boxes in Java Program

Message Boxes in Java Program

Message Boxes in Java Program

import java.awt.*;
import java.awt.event.*;
import javax.Swing.*;
public class MessageBoxes extends JFrame
{
private JPanel panel;
public MessageBoxes()
{
setTitle("Message Boxes");
panel=new JPanel();
JOptionPane.showMessageDialog(panel,"could not open file","ERROR");
JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(panel,"Information Message","Information",JOption pane.INFORMATION_MEASSAGE);
JOptionPane.showMessageDialog(panel,"Warning Message","warning",JOptionPane.WARNING_MESSAGE);
JOptionPane.showMessageDialog(panel,"Question Message","Information",JOption pane.QUESTION_MEASSAGE);
JOptionPane.showMessageDialog(panel,"palinMessage","plain",JOptionPane,PLAIN_,MESSAGE);
setSize(300,200);
setLocationRelativeto(null);
setDefaultCloseOperation(EXIT_ON_CLOSE);
setVisible(true);
}
public Static void main(String[] args)
{
new MessageBoxes();
}


0 coment�rios:

Post a Comment

Link you don't want to vouch for Read more: https://html.com/seo/#ixzz5zVltiZ5g