Chat Transcript, Sunday June 29 

=> [wachsmut] joins at Sat Jun 21 15:56:31 1997 from 140.233.10.18 
=> [dave] joins at Sun Jun 22 17:10:08 1997 from 151.198.127.2
=> [dave] leaves at Sun Jun 22 17:10:17 1997
=> [David] joins at Sun Jun 22 19:47:42 1997 from 151.198.127.1

wachsmut=> Hi David ... early today?
David=> yes, hello, how are you
wachsmut=> sorry ... I am fine, thanks, what's up on your end ?
David=> Sunday..getting ready for Monday
wachsmut=> I see ... if I'd asked on Monday, I think I know what you would say ...
David=> ha ha
wachsmut=> trying ...
wachsmut=> hope some more people will join soon ... what time do you have ?
David=> 7:59
David=> 8:00
wachsmut=> okay, there's still hope then - but getting close !
David=> Did you get my email about the chat program
wachsmut=> yes, sorry I did not reply sooner ...
wachsmut=> sure, you can have the program ...
wachsmut=> both, the client and the server package, if you like.
David=> I don't have access to work email from home..can you believe it
wachsmut=> I still have to modify it slightly, but you're welcome to use it.
wachsmut=> Actually, at Seton Hall they only very recently established this

=> [Rob] joins at Sun Jun 22 20:00:47 1997 from 128.122.175.201

wachsmut=> web mail ... before that, no access to email from home !
wachsmut=> Hi Rob ....
David=> hi Rob
Rob=> hi all!
wachsmut=> Thanks for your questions ... hope I answered them ....
wachsmut=> and "all" is relative, in this case !
Rob=> Yes... you just made one mistake in your responses....
wachsmut=> AGAIN ....
Rob=> You said that I was right "as usual"...
wachsmut=> oh, I see .... just trying to be nice !
Rob=> This, according to my wife, is INCORRECT!
wachsmut=> Well, wives don't always have to be nice !
Rob=> she usually is.....
wachsmut=> just kidding ....

=> [Don] joins at Sun Jun 22 20:02:24 1997 from 206.173.45.59

David=> be carefull
Rob=> anyway, yes, thanks for your answers....
wachsmut=> Alright, it's now 8:03 on my watch ....
wachsmut=> and, just on cue, there's Don ...
David=> hi Don
Don=> hello
wachsmut=> Let's wait until 8:05 and then we start "for real" ....
wachsmut=> 8:04 now ... and ticking ...
wachsmut=> 8:05 - here we go .......
wachsmut=> First, thanks for coming (...) today I am actually in Middlebury,
wachsmut=> Vermont, taking "Mobile computing" literally.
wachsmut=> I did find a computer, though, so ... here we are !
wachsmut=> I did put up one more lecture on "try-catch",
Rob=> Should be nice there.
wachsmut=> including a "NumberField" ... that would make another nice
wachsmut=> portfolio piece, suitably modified.
David=> did not review it yet
wachsmut=> that's okay ....
wachsmut=> Then I started a sequence of notes on "Networking",
David=> cool
wachsmut=> and that's what we want to kind of summarize in advance today.
wachsmut=> First, though, as usual, are they any questions ?

=> [Jenn] joins at Sun Jun 22 20:05:33 1997 from 199.174.171.228

Don=> I dont know if it really needs
Don=> to be discussed here, but ZI am having
wachsmut=> (hi jenn, ...)
Don=> trouble telnetting my portfolio pieces over.
Don=> I keep getting something like 'host not available'
Jenn=> hi
wachsmut=> I see ... actually, the correct terminology would be:
Don=> or something like that
wachsmut=> ftp'ing the stuff over.
wachsmut=> That's okay, we'll discuss that during our second-last meeting
Don=> yeah that's whaT I mean
wachsmut=> on Wed..... which is when you need to start getting your
wachsmut=> portfolio ready. I'll have a brief handout for that, too, so
wachsmut=> maybe that helps.
Don=> okay. thanks
wachsmut=> If you like, though, send me an email, and I'll give you some
wachsmut=> advanced instructions.....
Don=> i'll wait until thenm and go from there
wachsmut=> Great .... anything else ?
Don=> not from here
wachsmut=> anywhere else ?
Rob=> Am I correct in saying that the Dimension preferredSize is used ..
Rob=> only for applications, not for applets?
wachsmut=> (is this a lawyer talking)
wachsmut=> Actually,
wachsmut=> public dimension preferredSize is used for anything that
wachsmut=> extends Component (I think). It is used
wachsmut=> by a layout manager to ask for the preferred size of the component,
wachsmut=> so that it can be laid out properly.
wachsmut=> You *only* need to override that, if
wachsmut=> you design your own reusable classes, and your class
wachsmut=> extends something that does not, by default, have a proper
wachsmut=> preferredSize method.
wachsmut=> For example:
wachsmut=> NumberField extends TextField
wachsmut=> - TextField does have a nice preferredSize method already, no
wachsmut=> need to override it.
wachsmut=> - ColorSelector extends Canvas
wachsmut=> that does need a 'preferredSize' method so that
wachsmut=> it can be laid out correctly.
wachsmut=> Does that help ?
Rob=> It seems to me that that the size of an applet will be decided itself will be....
Rob=> decided by the html file that refers to the applet... however, I guess if the
Rob=> applet is composed of (among other things) a canvas, then we should use
Rob=> preferred size for the canvas?....
wachsmut=> Well, yes, but not always.
wachsmut=> If, for example, you add a canvas into a BorderLayout, and in the Center
wachsmut=> of it, it will automatically get all remaining space.
wachsmut=> But if you enter a Canvas in a borderLayout in the "North", then
wachsmut=> without a 'preferredSize' method it may not show up at all - since
wachsmut=> the default dimesions are height = width = 0 ... possibly.
wachsmut=> If you write 'larger' applets or programs, you will find that
wachsmut=> much of your code - and headaches - have to be devoted to
wachsmut=> sizing things correctly. preferredSize is just one of the things to
wachsmut=> worry about.
wachsmut=> And, by the way, since an applet is not added to anything by
wachsmut=> by a layout manager, an applet does not need that method.
wachsmut=> But, the thing *added to* an applet may need it.
Rob=> does a frame need it?
wachsmut=> Anything else ? Say "no" if you're okay for now, please....
wachsmut=>
wachsmut=> Sorry, Rob ....
wachsmut=> thinking ....
Rob=> no problem... carry on.
wachsmut=> I don't know .....
wachsmut=> actually, no.
wachsmut=> a Frame is not added via a layout manager, so no, it does not need
wachsmut=> it.
Rob=> that makes sense
wachsmut=> Anyone else ?
Don=> no
Jenn=> no
wachsmut=> David ?
wachsmut=> there's no game on today, so ..... hope everyone is "listening"
wachsmut=> carefully -:)
David=>
wachsmut=> Anyway, here's what we want to do today:
wachsmut=> I have preparred a small applet that
David=> something funky going on
wachsmut=> starts our "Networking" lectures ....
David=> never mind
wachsmut=> I'll bring it up on your screens, please follow the instructions, then
wachsmut=> come back here and say "Done", or "Thanks" or "Whatever" .....
wachsmut=> alright, here we go:
David=> ok
David=> back
wachsmut=> Alright, I hope you're back, and it worked so far ....
Jenn=> done...
wachsmut=> great, David.
Rob=> back
Don=> back
wachsmut=> Perfect ....
wachsmut=> That applet shows how to display - within an applet - something
wachsmut=> to the status line of your web browser.
wachsmut=> We will add a few things later to that applet, for now,
wachsmut=> please compile it, create an HTML document with an APPLET
wachsmut=> tag that sets Width=300 and height=300. Then
wachsmut=> open that HTML file in Netscape (not appletviewer), and click on the
wachsmut=> button. I give you 7 minutes for that .....
wachsmut=> alright, go for it (if you have questions, I'll be here)....
wachsmut=> By the way, open another Web browser first, so that you
wachsmut=> don't get disconnected from this Web window chat session ....
wachsmut=> know what I mean ....

=> [David] leaves at Sun Jun 22 20:24:42 1997

wachsmut=> let me know when you're back, please ...

=> [David] joins at Sun Jun 22 20:26:44 1997 from 151.198.127.1

David=> hello
Rob=> back
wachsmut=> one down, three to go ... did it work, David ?
wachsmut=> Did it work, Rob + David ?
David=> message "you clicked button" in browser..yes
Don=> back
Jenn=> BACK..
wachsmut=> Great ... looking good, then !
Rob=> there was a "show message" button, and when clicked it said as much...
Rob=> in the status bar.
wachsmut=> Very nice - exactly what had to happen ....
wachsmut=> Nothing much, but this is a very easy way to display
wachsmut=> a message to people from within an applet....
wachsmut=> simply say "showStatus("whatever you like");"
wachsmut=> and that will appear in the status bar ......
wachsmut=> Alright, now let's try to use a button inside an applet
wachsmut=> to direct our web browser to display some web page
wachsmut=> (like what I did when I "showed" you the previous web page with
wachsmut=> the links").
wachsmut=> It's about 10 lines we have to add to the code .....
wachsmut=> here are the instructions......
wachsmut=> 1. add another "private Button showURL = new Button("Show URL");
wachsmut=> to the fields
wachsmut=> Also add two more fields like this:
wachsmut=> "private URL url = null;
wachsmut=> private AppletContext browser;"
wachsmut=> So much for the fields
wachsmut=> 2. in the "init" method, add the following lines:
wachsmut=> "buttons.add(showURL);"
wachsmut=> and, more complicated:
wachsmut=> browser = getAppletContext();
wachsmut=> and finally:
wachsmut=> try { url = new URL("http://www.yahoo.com"); }
wachsmut=> catch(Exception e) { }
wachsmut=> 3. Add to the "action" method the following, after the first IF is done:
wachsmut=> if (e.target == showURL)
wachsmut=> browser.showDocument(url);
wachsmut=> Alright, go for it .... let me know if you need assistance.....
wachsmut=> I FORGOT - CHANGE THE NAME TO NetIntro2 and save as
wachsmut=> NetIntro2.java ! Finally, compile, add another <APPLET CODE=NetIntro2.class...>
wachsmut=> tag to your previous HTML document, and check it out.
Don=> how long?
wachsmut=> whatever it takes ... if you're not done in, say, 7 minutes, let
wachsmut=> me know and I'll "show" you the modified applet for you to save ....
wachsmut=> Go for it - if you're not already gone for it ....
wachsmut=> (hint: you can copy-and-paste from this chat screen ....)
wachsmut=> (control-C to copy .... -:)
wachsmut=> Alright, how's it coming ?
wachsmut=> anybody need some help ?

=> [David] leaves at Sun Jun 22 20:46:02 1997

wachsmut=> hmmm ... alright, sombody "disconnected"... if we're lucky, that
wachsmut=> means that it worked !

=> [David] joins at Sun Jun 22 20:46:36 1997 from 151.198.127.1

wachsmut=> or, it means that David had to go ....
wachsmut=> Alright, David, did it work ??????
David=> works!
wachsmut=> Cool ....
David=> very cool
wachsmut=> let's wait for the others, for just a few minutes .
Don=> back, but i made a stupid mistake
wachsmut=> No problem .....
Don=> saved as Netitnro2 instead of
Don=> NetIntro2
wachsmut=> it happens ... -:)
Don=> took me long time to see that, will get it to work after class
wachsmut=> Let's see if we hear from Rob and Jenn soon .....
wachsmut=> No problem, Don .... I'll also "show" you the two files
wachsmut=> so you can download them and play with them .....
wachsmut=> Let's see, one more minute, then we'll continue .....
Rob=> well, i've got enough errors in mine to keep me busy for a couple of days....
wachsmut=> Rob, Jenn, perhaps you can rejoin and work later on your applets .....
Rob=> well, maybe not that long, but I'll have to check it later.
wachsmut=> Alright, these two examples show that it is easy
wachsmut=> to display a status line for short messages from an applet,
wachsmut=> and in case your applet needs to display a lot of formatted text
wachsmut=> - like a help screen for example - you can write
wachsmut=> that page as an HTML document, and then show it when a user
wachsmut=> clicks on the button.
wachsmut=> Of course, plenty other uses for it.
wachsmut=> For those people for whom it did not work, what should have happend
wachsmut=> is:
wachsmut=> another buttons show up, and clicking on it brings up the
wachsmut=> Yahoo page in place of the current page (with the applets). But,
wachsmut=> you can do better than that, easily:
wachsmut=> you can bring up a web page in a new window, leaving your old
wachsmut=> window untouched.
wachsmut=> And, it's simple:
wachsmut=> change:
wachsmut=> browser.showDocument(url);
wachsmut=> to
wachsmut=> browser.showDocument(url,"_new");
wachsmut=> and your URL will display in another window.
wachsmut=> Don't try it now, though .....
wachsmut=> Alright, the last example I prepared was to display an image inside
wachsmut=> a web page.
wachsmut=> Rather than showing you how to modify your code, let me "Show" you
wachsmut=> the entire applet - you can save it and study it later .....
wachsmut=> hang on .... (20 seconds, I need to find it first) .....
wachsmut=> alright, got it .... here we go ... please save as "NetIntro4.java"
wachsmut=> then come back for conclusion ....
wachsmut=> here we go ...
wachsmut=> Alright, got it ?
Don=> back
Rob=> yep
wachsmut=> Great .... the last "easy" thing is how to load a sound .....
wachsmut=> but not now !
David=> back
wachsmut=> I've added some notes already, with more details
wachsmut=> about what we did today..... I'll add more about loading
wachsmut=> images and sounds tonight - or actually tomorrow .....
wachsmut=> That's all, folks .....
wachsmut=> if you like, compile NetIntro4.java, in the same directory as the image
wachsmut=> add the appriate <APPLET> tag to your HTML document, and with a click
wachsmut=> of a button, you should - hopefully - see the image !
wachsmut=> Anyway .....
wachsmut=> I'll be hanging around for a little more, if you like to try, or have
wachsmut=> other questions, go ahead. Other than that, class is "officially dismissed" !
Don=> Thanks, I'll post if I have any questions.
Don=> byy
wachsmut=> Sure, bye ....
Don=> whoopp I mean bye
wachsmut=> I meant byy....
Don=> ha ha

=> [Don] leaves at Sun Jun 22 20:58:51 1997

Rob=> ok...good night.

=> [Rob] leaves at Sun Jun 22 20:59:38 1997

wachsmut=> Night, Rob ... oops, already gone !
wachsmut=> Jenn, David, are you still there ?
David=> yes, trying #4

=> [David] leaves at Sun Jun 22 21:01:48 1997

wachsmut=> Jenn, sorry, are you still there ?

=> [David] joins at Sun Jun 22 21:02:42 1997 from 151.198.127.1

David=> alright , see you Wensday, have a good one
wachsmut=> same to you, bye ....

=> [David] leaves at Sun Jun 22 21:04:21 1997

wachsmut=> Jenn, you still there ?????
wachsmut=> JENN ????
wachsmut=> Guess not .... bye, then .....