Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Feb 1999 19:59:05 +0100
From:      Christer Hermansson <mail@chdev.com>
To:        Vince Vielhaber <vev@michvhf.com>
Cc:        freebsd-java@FreeBSD.ORG
Subject:   Re: somewhat new to java questions
Message-ID:  <36CDB479.65A0EFC6@chdev.com>
References:  <XFMail.990216175813.vev@michvhf.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <std/disclaimers.h>                   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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36CDB479.65A0EFC6>