Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > how to display message box in applet

Reply
Thread Tools

how to display message box in applet

 
 
Madhur Ahuja
Guest
Posts: n/a
 
      08-09-2004
Can javax.swing.JoptionPane.showMessageDialog() be used in a Applet. If not,
what should I use.

--
Winners dont do different things, they do things differently.

Madhur Ahuja
India

Homepage : http://madhur.netfirms.com
Email : madhur<underscore>ahuja<at>yahoo<dot>com





 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      08-09-2004
On Tue, 10 Aug 2004 02:33:51 +0530, Madhur Ahuja wrote:

> Can javax.swing.JoptionPane.showMessageDialog() be used in a Applet.


Did you try it?

>...If not,
> what should I use.


If not, why not?

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
Reply With Quote
 
 
 
 
Madhur Ahuja
Guest
Posts: n/a
 
      08-09-2004
Yes, I tried ,but it didn't worked. I used
JOptionPane.showMessageDialog("madhur");

The program executes, successfully, no error message, but the message doesnt
displays.

--
Winners dont do different things, they do things differently.

Madhur Ahuja
India

Homepage : http://madhur.netfirms.com
Email : madhur<underscore>ahuja<at>yahoo<dot>com



"Andrew Thompson" <(E-Mail Removed)> wrote in message
news:1ieyllam3utm5.zzm89tkz90hr$(E-Mail Removed)...
> On Tue, 10 Aug 2004 02:33:51 +0530, Madhur Ahuja wrote:
>
> > Can javax.swing.JoptionPane.showMessageDialog() be used in a Applet.

>
> Did you try it?
>
> >...If not,
> > what should I use.

>
> If not, why not?
>
> --
> Andrew Thompson
> http://www.PhySci.org/ Open-source software suite
> http://www.PhySci.org/codes/ Web & IT Help
> http://www.1point1C.org/ Science & Technology



 
Reply With Quote
 
Matt Humphrey
Guest
Posts: n/a
 
      08-09-2004

"Madhur Ahuja" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Yes, I tried ,but it didn't worked. I used
> JOptionPane.showMessageDialog("madhur");
>
> The program executes, successfully, no error message, but the message

doesnt
> displays.


I find it hard to believe that the very widely used JOptionPane would simply
do nothing at all. I would think that either Swing is available and it
should work (I just tried it from a 1.1.8 compatible Applet) or you should
get a ClassNotFound exception. Are you sure the dialog was executed? Did
you check the console for messages, as it may have terminated after making
an initial appearance. Are you sure the applet reloaded?

Cheers,
Matt Humphrey http://www.velocityreviews.com/forums/(E-Mail Removed) http://www.iviz.com/


 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      08-10-2004
On Mon, 9 Aug 2004 19:59:58 -0400, Matt Humphrey wrote:
> "Madhur Ahuja" <(E-Mail Removed)> wrote in message

...
>> Yes, I tried ,but it didn't worked. I used
>> JOptionPane.showMessageDialog("madhur");
>>
>> The program executes, successfully,
>> no error message, but the message doesnt
>> displays.

>
> I find it hard to believe that the very widely used JOptionPane would simply
> do nothing at all.


I agree, are you using IE, Madhur?

> ...I would think that either Swing is available and it
> should work (I just tried it from a 1.1.8 compatible Applet)


Swing was not part of the core classes until 1.2,
it should fail on a 1.1.8 JVM..

> ..or you should
> get a ClassNotFound exception.


If using a pre 1.2 JVM such as the MSVM for instance..

>..Are you sure the dialog was executed? Did
> you check the console for messages, as it may have terminated after making
> an initial appearance.


I suspect that is the case..

Madhur, we need more details..
What browser/version are you using on what OS?
What version of Java is running in it?
<http://www.physci.org/pc/property.jsp?prop=java.version>
Do you know how to find the console in your browser?

Also, I think it might help to put an example
on the net, perfect for an applet..
<http://www.physci.org/codes/sscce.jsp>

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
Reply With Quote
 
Madhur Ahuja
Guest
Posts: n/a
 
      08-10-2004
Sorry, It is working.
Actually the problem was the editor JCreator, it was loading the old copy of
the class file rather than newly compiled.

--
Winners dont do different things, they do things differently.

Madhur Ahuja
India

Homepage : http://madhur.netfirms.com
Email : madhur<underscore>ahuja<at>yahoo<dot>com



"Andrew Thompson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Mon, 9 Aug 2004 19:59:58 -0400, Matt Humphrey wrote:
> > "Madhur Ahuja" <(E-Mail Removed)> wrote in message

> ..
> >> Yes, I tried ,but it didn't worked. I used
> >> JOptionPane.showMessageDialog("madhur");
> >>
> >> The program executes, successfully,
> >> no error message, but the message doesnt
> >> displays.

> >
> > I find it hard to believe that the very widely used JOptionPane would

simply
> > do nothing at all.

>
> I agree, are you using IE, Madhur?
>
> > ...I would think that either Swing is available and it
> > should work (I just tried it from a 1.1.8 compatible Applet)

>
> Swing was not part of the core classes until 1.2,
> it should fail on a 1.1.8 JVM..
>
> > ..or you should
> > get a ClassNotFound exception.

>
> If using a pre 1.2 JVM such as the MSVM for instance..
>
> >..Are you sure the dialog was executed? Did
> > you check the console for messages, as it may have terminated after

making
> > an initial appearance.

>
> I suspect that is the case..
>
> Madhur, we need more details..
> What browser/version are you using on what OS?
> What version of Java is running in it?
> <http://www.physci.org/pc/property.jsp?prop=java.version>
> Do you know how to find the console in your browser?
>
> Also, I think it might help to put an example
> on the net, perfect for an applet..
> <http://www.physci.org/codes/sscce.jsp>
>
> --
> Andrew Thompson
> http://www.PhySci.org/ Open-source software suite
> http://www.PhySci.org/codes/ Web & IT Help
> http://www.1point1C.org/ Science & Technology



 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      08-10-2004
On Tue, 10 Aug 2004 12:16:53 +0530, Madhur Ahuja wrote:

> Actually the problem was the editor JCreator,


It's a deeper problem than that, try compiling
running without an IDE..
<http://www.xdweb.net/~dibblego/java/faq/answers.html#q34>

>..it was loading the old copy of
> the class file rather than newly compiled.


Yeah, yeah, ..blame the IDE.

Have some thought about..
<http://www.physci.org/codes/javafaq.jsp#cljh>

And please refrain from top-posting Madhur,
I find it most confusing..
<http://www.physci.org/codes/javafaq.jsp#netiquette>

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
Reply With Quote
 
Matt Humphrey
Guest
Posts: n/a
 
      08-10-2004

"Andrew Thompson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Mon, 9 Aug 2004 19:59:58 -0400, Matt Humphrey wrote:
> > "Madhur Ahuja" <(E-Mail Removed)> wrote in message

> ..
> >> Yes, I tried ,but it didn't worked. I used
> >> JOptionPane.showMessageDialog("madhur");
> >>
> >> The program executes, successfully,
> >> no error message, but the message doesnt
> >> displays.

> >
> > I find it hard to believe that the very widely used JOptionPane would

simply
> > do nothing at all.

>
> I agree, are you using IE, Madhur?
>
> > ...I would think that either Swing is available and it
> > should work (I just tried it from a 1.1.8 compatible Applet)

>
> Swing was not part of the core classes until 1.2,
> it should fail on a 1.1.8 JVM..


I agree. I inserted the call into an Applet that normally runs under 1.1.8
and compiled and ran it with the 1.4.2 plug-in. My point was that either
Swing is available and any use of JOptionPane would work (even from an
Applet--not JApplet), or it's not available and wouldn't work. JOptionPane
has a Component parameter that wasn't shown.

Cheers,
Matt Humphrey (E-Mail Removed) http://www.iviz.com/


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
div box questions; float text around a box, fit box to image size Gnarlodious HTML 4 05-05-2010 11:30 AM
Want to display a message box while subprocess is running dudeja.rajat@gmail.com Python 0 09-06-2008 04:47 PM
display a message that Applet is loading! while applet loads shaillenkumar@gmail.com Javascript 1 06-09-2006 08:24 AM
display confirm message box for action Grey ASP .Net 7 09-07-2004 04:30 PM
display message box in ASP.NET when delete command is fired Next ASP .Net Datagrid Control 1 11-19-2003 09:47 PM



Advertisments