From owner-freebsd-java Fri Feb 19 10:55:32 1999 Delivered-To: freebsd-java@freebsd.org Received: from angel.algonet.se (angel.algonet.se [194.213.74.112]) by hub.freebsd.org (Postfix) with SMTP id 6EFEF1154C for ; Fri, 19 Feb 1999 10:55:11 -0800 (PST) (envelope-from mail@chdev.com) Received: (qmail 16630 invoked from network); 19 Feb 1999 19:55:09 +0100 Received: from sdu250-237.ppp.algonet.se (HELO chdev.com) (195.163.237.250) by angel.algonet.se with SMTP; 19 Feb 1999 19:55:09 +0100 Message-ID: <36CDB479.65A0EFC6@chdev.com> Date: Fri, 19 Feb 1999 19:59:05 +0100 From: Christer Hermansson Organization: CH development X-Mailer: Mozilla 4.5 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: Vince Vielhaber Cc: freebsd-java@FreeBSD.ORG Subject: Re: somewhat new to java questions References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hello Vince. Vince Vielhaber wrote: > Being fairly new to java but not new to C or C++, I'm finding myself > running into a few walls. Most of which I find my way around, however > right now I need to do two things that aren't making themselves obvious > by any stretch of the imagination. Perhaps they can't be done. > > Background: It's an Applet that's run from the browser. > > 1) I check the lengths of the data in a few TextFields and if they're > not at least a certain length I need to pop up a box that says so and > after they click on OK they can fix it. In both Windows and OS/2-PM > I had a function called MessageBox. Is there something similar here? I don't know about any thing like MessageBox in AWT or Swing but check out this http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html > > 2) After all the boxes have been filled in and the Send button is > pressed, I need to tell the browser to go to another URL (possibly > a cgi). Is there something that will tell the browser to do it? I would use something like this: URL url = null; try { url = new URL("http://www.javasoft.com"); } catch (MalformedURLException ex) { System.err.println("Malformed URL !"); } if (url != null) { AppletContext appletContext = getAppletContext(); appletContext.showDocument(url); } else { System.err.println("url == null !"); } > > > I'm not really sure that this is what this list is about, but the traffic > is rather low here so I thought I'd at least give this one a try. > > Thanks in advance, > > Vince. > -- > ========================================================================== > Vince Vielhaber -- KA8CSH email: vev@michvhf.com flame-mail: /dev/null > # include TEAM-OS2 > Online Campground Directory http://www.camping-usa.com > Online Giftshop Superstore http://www.cloudninegifts.com > ========================================================================== > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-java" in the body of the message -- CH development Christer Hermansson Rostocksgatan 27A 464 31 Mellerud Sweden mailto:mail@chdev.com http://www.chdev.com Phone:+46(0)530-13420 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message