JavaX.swing.*Aryan Nardiganj May 24, 2011 at 6:55 PM
import javax.swing.*;
import java.awt.event.*;
public class ShowDialogBox{
JFrame frame;
public static void main(String[] args){
ShowDialogBox db = new ShowDialogBox();
}
public ShowDialogBox(){
frame = new JFrame("Show Message Dialog");
JButton button = new JButton("Click Me");
button.addActionListener(new MyAction());
frame.add(button);
frame.setSize(400, 400);
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public class MyAction implements ActionListener{
public void actionPerformed(ActionEvent e){
JOptionPane.showMessageDialog(frame,"Roseindia.net");
}
}
}
Hey I downloaded your example , I Putted it into EditPlus 3 so . then I'm trying to compile it but it's showing "Output completed" ... - normal termination , or W.E I'm waiting . Waiting . but it's not opening the box or W.E it is : /
Thank You!
P.S:I know my english is not the best try to understand ;)
At this point in my learning, I am more impressed by your work than most others could possibly be. This is meant as a compliment, I truly cannot wait until I become useful in the programming world.
JavaX.swing.*Aryan Nardiganj May 24, 2011 at 6:55 PM
import javax.swing.*; import java.awt.event.*; public class ShowDialogBox{ JFrame frame; public static void main(String[] args){ ShowDialogBox db = new ShowDialogBox(); } public ShowDialogBox(){ frame = new JFrame("Show Message Dialog"); JButton button = new JButton("Click Me"); button.addActionListener(new MyAction()); frame.add(button); frame.setSize(400, 400); frame.setVisible(true); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } public class MyAction implements ActionListener{ public void actionPerformed(ActionEvent e){ JOptionPane.showMessageDialog(frame,"Roseindia.net"); } } }
thankyoudinesh September 17, 2011 at 8:57 PM
thankyou
javaenock senkusu September 27, 2011 at 12:10 PM
what u do benefits every one who accesses it thanx
Show Dialog Box in javaUday Magdum January 12, 2012 at 5:04 PM
i Like this code. it's usefull for me. so thanks...
javacodeR.kartikeyen jagadeesh February 16, 2012 at 2:14 PM
good explanation.
java examplesmenaka March 21, 2012 at 11:18 AM
i want more details of new example
sweetjimmy March 23, 2012 at 1:07 AM
thanks bro
HelloTomi April 8, 2012 at 12:12 PM
Hey I downloaded your example , I Putted it into EditPlus 3 so . then I'm trying to compile it but it's showing "Output completed" ... - normal termination , or W.E I'm waiting . Waiting . but it's not opening the box or W.E it is : / Thank You! P.S:I know my english is not the best try to understand ;)
HiPrakash April 30, 2012 at 1:54 AM
Thanks Dude !! This code helped me a lot.
javajhan lee September 18, 2012 at 4:03 PM
graet but this is not just what i need...
ImpressedGeorge M December 30, 2012 at 6:28 AM
At this point in my learning, I am more impressed by your work than most others could possibly be. This is meant as a compliment, I truly cannot wait until I become useful in the programming world.
javakishan lodhari December 1, 2012 at 12:36 AM
i am very happy because my problem are solve .......:)
commentmanideep May 4, 2013 at 1:14 PM
compileation error
Java MessageDialogBoxNakul July 1, 2011 at 10:45 PM
how to put an image in dialog box????
Post your Comment