Article View: comp.lang.java.programmer
Article #432Re: Pop up a message box in applet
From: cooljavafolks
Date: Mon, 29 Jun 1998 00:00
Date: Mon, 29 Jun 1998 00:00
46 lines
2705 bytes
2705 bytes
Hi, You can do this by using the getParent() method. To pop-up any dialog box, we need a Frame. The reference to a Frame can be obtained by doing a getParent() on the applet, until we get a frame. Sometimes, simply passing a new Frame() to the constructor of the dialog also will suffice. CoolJava Folks! <cooljavafolks@yahoo.com> Java Development & Consultancy @ $25 / Hour in India. In article <6n6nh9$bd1$1@nnrp1.dejanews.com>, morris_newsgroup@yahoo.com wrote: > > I have an applet which accepts input from users through a GUI. I'm trying to > pop up a message box with only an OK button when users make an error. Is > this doable in applet or I can only do this in an application instead. I > think this is a general java gui question. By the way, I'm using JBuilder2 > and found that when I dropped a message component onto my applet. I can't > find a frame which the message component can use. In other words, there was > nothing in the frame property of the message component. I tried to create a > frame inside the applet source code and it seemed to have some security > errors when I ran the applet in the browser. > > Does anyone know anything about this? It may not be just a JBuilder2 > question. In general, I would like to know if it's possible that I can pop up > a message box with either just a message or a text box which users can enter > something in an applet. > > Sample code would be helpful if this is possible. > > Thanks for your help in advance, > Morris > > -----== Posted via Deja News, The Leader in Internet Discussion ==----- > http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum > -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
Technical Details
Message-ID:
<6n6tq8$hq9$1@nnrp1.dejanews.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6n6nh9$bd1$1@nnrp1.dejanews.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10fd6d,afddcc2748cf26d8 X-Google-Attributes: gid10fd6d,public X-Google-Thread: 10a146,afddcc2748cf26d8 X-Google-Attributes: gid10a146,public X-Google-Thread: fa3e3,afddcc2748cf26d8 X-Google-Attributes: gidfa3e3,public X-Google-Thread: f74b3,afddcc2748cf26d8 X-Google-Attributes: gidf74b3,public From: cooljavafolks@yahoo.com Subject: Re: Pop up a message box in applet Date: 1998/06/29 Message-ID: <6n6tq8$hq9$1@nnrp1.dejanews.com> X-Deja-AN: 366981222 References: <6n6nh9$bd1$1@nnrp1.dejanews.com> To: morris_newsgroup@yahoo.com X-Http-User-Agent: Mozilla/4.04 [en] (Win95; I) Organization: CoolJava Folks! X-Article-Creation-Date: Mon Jun 29 02:23:05 1998 GMT Newsgroups: comp.lang.java.programmer,borland.public.jbuilder.java.language,comp.lang.java.gui,borland.public.jbuilder.ide