Chat Transcript, Sun, June 8
[wachsmut] joins at Sun Jun 08 20:02:02 1997 from 153.35.23.167
wachsmut=> Hello, anyone out there ????????? |
[David] joins at Sun Jun 08 20:02:29 1997 from 151.198.127.28
wachsmut=> Hi David ... | |
David=> Hi Prof. | |
wachsmut=> good to see you, got your email, thanks ! |
[Jenn] joins at Sun Jun 08 20:02:49 1997 from 199.174.141.196
wachsmut=> Hi Jenn ... | |
Jenn=> hi prof. | |
wachsmut=> Alright, let's wait - as usual ... - for a little, | |
wachsmut=> see if anyone else will stop by (I hope so !) | |
wachsmut=> While we are waiting, | |
wachsmut=> did you get my email about the three credit course ? | |
Jenn=> yes | |
wachsmut=> If you guys want to switch, I can arrange that any time | |
David=> yes, hope to take care of next week | |
wachsmut=> Actually, just tell me, I do it - no problem ! | |
Jenn=> i think i emailed you about it... | |
David=> , just do it , thanks | |
wachsmut=> Want me to do it, then, David (I'll do it tomorrow) | |
wachsmut=> Alright ... and Jenn, I did not get any email from you, sorry. | |
Jenn=> ok.. well i want the three credits.. | |
wachsmut=> Alright, I switch both of you to the three credit course, then. | |
wachsmut=> on monday ..... | |
Jenn=> i have a question about our porfolios.. | |
wachsmut=> yes | |
Jenn=> are they due at the end of the month or do we have all summer to do them? | |
wachsmut=> well, officially the class is over July 27, I think. | |
wachsmut=> I was planning to do this 'chat' stuff, teaching, etc, until | |
wachsmut=> June 30th, so that gives you, | |
wachsmut=> if you want, until July 25th, or something, | |
wachsmut=> to complete the portfolios .... | |
wachsmut=> actually, I rather have the four pieces by the time | |
wachsmut=> class ends, but for the 'final' piece (for 3 credits) | |
wachsmut=> you can take all of July, if you like. | |
wachsmut=> I will, of course, help you during that time, if you ask me | |
Jenn=> ok, thanks... | |
wachsmut=> for any help ! | |
wachsmut=> No problem .... | |
wachsmut=> Alright, looks like it's just the three of us, then.... | |
David=> I second that tanks | |
wachsmut=> a second no problem .... | |
wachsmut=> let's cut it short, then .... if you don't mind ..... | |
David=> it must be the nice weather | |
wachsmut=> or something on the tube, perhaps ? | |
David=> boob tube | |
wachsmut=> oh well, it's somewhat annoying, since I do have to | |
Jenn=> probably the game.. | |
wachsmut=> spend some time preparing ..... oh well ..... | |
wachsmut=> yes, game could be .... | |
wachsmut=> anyhow, here's what I meant to do, in short: | |
wachsmut=> I wanted to ask you, as usual, questions like this: | |
David=> i paid my wife to take the kids upstairs for an hour | |
wachsmut=> welll ... I know what you mean, I had to negotiate, too, today ! | |
wachsmut=> Sunday's not a good time, I think .... -:) | |
David=> pay back will be a b___ | |
wachsmut=> Anyhow, make sure you know the following: | |
wachsmut=> three layout manager names ..... | |
wachsmut=> what to use to combine different layouts .... | |
wachsmut=> at least 5 GUI components | |
wachsmut=> anybody wanna - quickly - jump in with some answers ? | |
David=> grid, flow layout, boarder | |
wachsmut=> Yes ... | |
wachsmut=> what to use to combine different ones is a .... P .... | |
wachsmut=> Pa .... | |
wachsmut=> Pan .... | |
Jenn=> panel? | |
wachsmut=> yes, thanks ! | |
wachsmut=> Finally, let's go through all GUI Components we know so far: | |
wachsmut=> go ahead .... | |
David=> button? | |
wachsmut=> yes, more | |
David=> label | |
wachsmut=> yes, more | |
Jenn=> textfield? | |
wachsmut=> Text?????? | |
wachsmut=> yes, thanks ! | |
wachsmut=> and Text????? | |
David=> frame | |
wachsmut=> yes, frame's good - also Panel | |
wachsmut=> and Text????? (the new stuff) | |
David=> sorry? | |
wachsmut=> TextArea ! | |
Jenn=> area | |
wachsmut=> in lecture 6 .... | |
wachsmut=> I introduce a TextArea and a List .... |
[David] leaves at Sun Jun 08 20:14:39 1997
wachsmut=> a TextArea is a 'multi-line' area to display text, which can | |
wachsmut=> be optionally editable or not. | |
wachsmut=> An example of a TextArea is .... | |
wachsmut=> well, you're looking at one right now .... | |
wachsmut=> try it, you can actually 'cut-and-paste' whatever I am typing | |
wachsmut=> |
[David] joins at Sun Jun 08 20:15:34 1997 from 151.198.127.28
wachsmut=> or what you're saying .... | |
wachsmut=> See, that's a TextArea .... | |
wachsmut=> and a list ... there's also a List in this applet (Chat applet).... | |
wachsmut=> can you see it ? | |
wachsmut=> hint: look to the right .... | |
Jenn=> the participants | |
wachsmut=> yes, there we go .... | |
wachsmut=> Alright, with those components we can make reasobly | |
wachsmut=> cool programs and applet ..... | |
wachsmut=> actually, we only know programs so far, so today we'll turn a | |
wachsmut=> sample program into an applet ..... | |
wachsmut=> first, though, any questions ? | |
Jenn=> no | |
wachsmut=> quick answer, I like it ! | |
David=> no | |
wachsmut=> well .... | |
wachsmut=> alright, here's something fun ... | |
wachsmut=> again, are both of you using Windows 95 right now ? | |
David=> yes | |
Jenn=> yes | |
wachsmut=> and is the 'allow show' above the 'Participants' checked ? | |
David=> yes | |
Jenn=> yes | |
wachsmut=> I will show you a sample program in a second .... | |
David=> cool | |
wachsmut=> please take a look at it, then go to 'File' and save it | |
wachsmut=> as Task.java | |
wachsmut=> then come back here and tell me whether you did that. | |
David=> ok | |
wachsmut=> Okay, here's the applet (hold on for a second)..... | |
wachsmut=> Alright, got it ? Saved and all ? | |
David=> ? | |
wachsmut=> David, did you see anything ? | |
Jenn=> | |
David=> go to the url and save? | |
David=> no | |
David=> sorry, just url | |
wachsmut=> yes ... but you should have seen it on the screen ... guess not .... | |
David=> nope | |
wachsmut=> alright, 'cut-paste' the URL, go to it (which will disconnect you), then | |
David=> i can go to address, | |
wachsmut=> save it, and come back and rejoin ..... | |
David=> ok | |
wachsmut=> Jenn, did you get it ? | |
Jenn=> yes.. | |
wachsmut=> great .... perhaps David has 'unchecked' the 'allow show' thingy .... | |
Jenn=> in pico, can we write the whole program as we see it? | |
wachsmut=> alright, let's wait until David is back, hopefully with a 'Got IT' .... | |
David=> it showed itself, got it | |
Jenn=> or do we have to do what we've been doing... writing the program in separate files? | |
David=> can you see me | |
wachsmut=> Yes, David | |
wachsmut=> | |
David=> got it | |
David=> it showed itself | |
wachsmut=> alright .... let's do something different right now ... | |
wachsmut=> sorry, yes, David ? | |
wachsmut=> Alright, both of you have saved the file 'Task.java' now .... | |
Jenn=> yes | |
David=> yes | |
wachsmut=> and both of you have the JDK installed on your PC ? | |
Jenn=> no | |
David=> yes | |
wachsmut=> Ah ... bummer .... | |
wachsmut=> Alright, here's your tasks for today, hang on .... | |
wachsmut=> David, use Notepad (or PFE) to compile the Task.java program on | |
wachsmut=> your PC. Then write a corresponding 'TaskTest' program to | |
wachsmut=> test it. | |
wachsmut=> Jenn, | |
wachsmut=> start Notepad, and open the file 'Task.java'. | |
wachsmut=> Mark everything, then 'copy' everything to the clipboard | |
wachsmut=> Then start Telnet, login to Sciris, switch to 'public_html', type | |
wachsmut=> pico Task.java | |
wachsmut=> then select 'Edit | copy' to get the program on Sciris. | |
wachsmut=> Save and compile, but don't run it, or create a main program for now. | |
wachsmut=> All clear, ready to go ? | |
wachsmut=> Actually, I was going to give you 5 minutes for this | |
wachsmut=> (because I have to go ... you know .... I'll be back in three minutes .... | |
wachsmut=> sorry about that ..... | |
wachsmut=> back in 3 .... | |
Jenn=> wait how do i copy to the clipboard? | |
wachsmut=> alright, I am back, sorry about that.. | |
wachsmut=> Jenn, if you are using 'Telnet', just click on 'Edit', then 'copy' | |
wachsmut=> MAKE SURE | |
Jenn=> oh no i got it.. sorry.. | |
David=> how do i call the contructor from test program? | |
wachsmut=> you start pico Task.java first, Jenn.... | |
wachsmut=> Alright, David .... | |
wachsmut=> standard main method, i.e. | |
wachsmut=> public static void main(String arg[]) | |
wachsmut=> { | |
wachsmut=> Task t = new Task(); | |
wachsmut=> } | |
wachsmut=> inside a | |
wachsmut=> public class TaskTest | |
wachsmut=> { | |
wachsmut=> ... | |
wachsmut=> } | |
David=> ok, be right back | |
wachsmut=> but, not so important right now, did you compile the | |
Jenn=> i compiled it.. | |
wachsmut=> Task.java .... both of you .... (running it is not so important) | |
wachsmut=> Great, Jenn ... hang on for David .... | |
Jenn=> ok.. | |
wachsmut=> he's trying to run the program, which you can't do from Sciris, | |
Jenn=> should i make a tasktest file? | |
Jenn=> oh... | |
wachsmut=> because the Task thing contains graphical elements .... | |
David=> it works, cool | |
wachsmut=> BUT, we'll turn it into an applet in a few minutes, then | |
David=> cooler | |
wachsmut=> both of you can 'run' it inside 'Netscape' .... | |
wachsmut=> alright ..... here we go..... | |
wachsmut=> Both of you have the Task.java somewhere in a window, | |
wachsmut=> telnet or notepad, ready to edit ? | |
David=> yes | |
Jenn=> yes | |
wachsmut=> For Jenn, the file must be in 'public_html', but don't worry if not, | |
wachsmut=> right now. | |
wachsmut=> | |
wachsmut=> Alright, to turn a 'program' into an applet is actually easy. | |
wachsmut=> Step one: | |
wachsmut=> add the line: | |
wachsmut=> import java.applet.*; | |
wachsmut=> to the top of the file...... | |
wachsmut=> then, where it says: | |
wachsmut=> public class Task extends Frame | |
wachsmut=> change that line to: | |
wachsmut=> public class Task extends Applet | |
wachsmut=> i.e. change 'Frame' to 'Applet' (capital A in this case) | |
wachsmut=> Then look at the constructor, which says: | |
wachsmut=> public Task() | |
wachsmut=> change that to say | |
wachsmut=> public void init() | |
wachsmut=> Finally, inside the method now called 'public void init()', | |
wachsmut=> delete the lines that say: | |
wachsmut=> validate() | |
wachsmut=> pack() | |
wachsmut=> show() | |
wachsmut=> i.e. | |
wachsmut=> the only thing in the 'public void init()' is a call to | |
wachsmut=> 'setup()' | |
wachsmut=> Done ? | |
David=> ok | |
Jenn=> yes | |
wachsmut=> Great .... save and compile ... hopefully, no errors ! LEt me know.... | |
Jenn=> i got an error... | |
wachsmut=> saying .... | |
wachsmut=> saying ???? | |
Jenn=> was i supposed to delete super("Task List")? | |
wachsmut=> oops ... yes ! | |
wachsmut=> sorry ! | |
wachsmut=> the only thing in the 'public void init()' method is: | |
Jenn=> ok... | |
wachsmut=> 'setup()', i.e. | |
David=> ok, clean | |
wachsmut=> public void init() | |
wachsmut=> { | |
wachsmut=> setup(); | |
wachsmut=> } | |
wachsmut=> Great, David ... hang on, let's see how Jenn is doing ... | |
Jenn=> ready | |
wachsmut=> Now, we got ourselves an applet ... how to we run it ? | |
wachsmut=> here's how : | |
wachsmut=> in a Text editor (pico or notepad), create a new file | |
wachsmut=> In that file, type the following: | |
wachsmut=> <HTML> | |
wachsmut=> <APPLET CLASS="Task.class" WIDTH=300 HEIGHT=200> | |
wachsmut=> </APPLET> | |
wachsmut=> See my applet above ? Isn't that something ? | |
wachsmut=> </HTML> | |
wachsmut=> Then, save the file as, for example, task.html | |
wachsmut=> in the SAME directory that the 'Task.java' file is..... | |
wachsmut=> Done ? | |
Jenn=> yes | |
David=> be right back | |
wachsmut=> Alright, while we wait for David, here's what you want to do, Jenn.... | |
wachsmut=> you've saved both files in 'public_html' ? | |
Jenn=> yes | |
wachsmut=> Alright, Jenn ... in Netscape, go to the address: | |
David=> ok | |
wachsmut=> http://sciris.shu.edu/~agasjenn/Task.html | |
wachsmut=> if you saved the file as 'Task.html', or whatever name you choose. | |
wachsmut=> remember, you might disconnect from Chat ... reconnect later .... | |
David=> should I just open then file in netscape | |
wachsmut=> David, we can both try the same URL .... let's do it, to see if Jenn's | |
wachsmut=> applet worked .... | |
wachsmut=> Yes, David, you could either see Jenn's applet at above URL, or | |
wachsmut=> see your own by 'opening a file' .... go ahead .... either way .... | |
wachsmut=> make sure you say something when you're back ..... |
[David] leaves at Sun Jun 08 20:47:25 1997
Jenn=> i just opened a new browser.. | |
Jenn=> and its blank... | |
wachsmut=> good idea ... I got the same .... let me check what's happening | |
wachsmut=> for you ... David, any luck ? | |
Jenn=> i think david left.. |
[David] joins at Sun Jun 08 20:49:10 1997 from 151.198.127.28
wachsmut=> yes, he's looking at his applet .... | |
wachsmut=> there he is ... did it work, David ? | |
David=> Just a blank screen, html? | |
wachsmut=> you too ..... hand on, give me two mintues | |
wachsmut=> to find the mistake .... | |
Jenn=> ok... | |
wachsmut=> alright, my mistake -:) | |
David=> stiff neck from looking at my PC all day.. | |
wachsmut=> in your file 'task.html', you write | |
wachsmut=> CODE="Task.class" .... | |
wachsmut=> change that to: | |
wachsmut=> CODE="Task.class" | |
wachsmut=> please .... | |
wachsmut=> sorry about that ... save the new 'task.html' file, and again look at | |
wachsmut=> it with netscape |
[David] leaves at Sun Jun 08 20:52:39 1997
Jenn=> got it! | |
wachsmut=> Alright !!!!! | |
wachsmut=> Yes, I can see your applet, too, Jenn ! |
[David] joins at Sun Jun 08 20:53:56 1997 from 151.198.127.28
wachsmut=> Let's see how David is doing .... | |
David=> Still nothing, it says chatter box is running? | |
wachsmut=> | |
David=> is it APPLET CODE = "Task.html" | |
wachsmut=> no ... | |
wachsmut=> it's | |
wachsmut=> <APPLET CODE="Task.class" WIDTH=300 HEIGHT=200> | |
wachsmut=> </APPLET> | |
David=> I'm sorry thats what i have | |
wachsmut=> alright, give it one more try, then we're 'out' of here .... -:) | |
David=> ok | |
wachsmut=> Jenn, hang on for three more minutes (I said it's short today, looks | |
wachsmut=> like I lied .... oh well ....) | |
Jenn=> sure.. | |
Jenn=> hehehe |
[David] leaves at Sun Jun 08 20:56:23 1997
Jenn=> so is this what our portfolio is supposed to look like? | |
wachsmut=> Well, yes, kind of .... |
[David] joins at Sun Jun 08 20:56:52 1997 from 151.198.127.28
wachsmut=> My idea would be this: | |
wachsmut=> first portfolio piece: | |
David=> I'll debug later or look at Jenn's | |
wachsmut=> either a program with inheritance, no GUI stuff, or | |
wachsmut=> a simple, stand-alone program, not an applet. | |
wachsmut=> Second one: a simple applet | |
David=> what was the question? | |
wachsmut=> third one: something more elaborate ... | |
Jenn=> what our portfolio consists of... | |
wachsmut=> fourth one: something with 'Network programming' or so. | |
wachsmut=> Alright, David, back ? | |
wachsmut=> hmmmm .... | |
wachsmut=> david, david, david, david, david, david, david, david, david ? | |
David=> yes | |
wachsmut=> Alright ... did it work ? | |
David=> hello | |
David=> no, did not find clas | |
wachsmut=> Alright, let's hang on ... and wrap up ... | |
David=> ok | |
wachsmut=> if you like, I can fix your problem later, or via email. | |
David=> no problem | |
wachsmut=> To change a 'stand-alone' | |
wachsmut=> program into an applet: | |
wachsmut=> instead of 'extends Frame', use 'extends Applet' | |
wachsmut=> (import java.applet.*; first) | |
wachsmut=> instead of a constructor, use | |
wachsmut=> public void init() | |
wachsmut=> exactly like that | |
wachsmut=> remove the methods 'validate, pack, and show' from | |
wachsmut=> the 'old' constructor, and any reference to 'super' in the old | |
wachsmut=> constructor - and | |
wachsmut=> you got yourself a basic applet..... | |
David=> not bad | |
wachsmut=> that works very often, but not always .... | |
wachsmut=> there are some minor details, we'll cover them later .... | |
wachsmut=> For now ..... class OVER ! | |
wachsmut=> David, if you want, send me email with the two files | |
Jenn=> ok.. see you guys on Wednesday! | |
Jenn=> bye! | |
wachsmut=> Task.java and Task.html .... and I can help you then ! | |
David=> ok, see you Wensday, thanks | |
wachsmut=> Bye Jenn |
[Jenn] leaves at Sun Jun 08 21:02:28 1997
wachsmut=> Alright, bye David ! | |
David=> BYE | |
wachsmut=> see you (say "Thanks" to your wife) ..... | |
David=> yes |
[David] leaves at Sun Jun 08 21:03:39 1997
[wachsmut] leaves at Sun Jun 08 21:03:45 1997
[yany] joins at Mon Jun 09 14:42:46 1997 from 149.150.169.26
yany=> hello | |
yany=> peter |
[yany] leaves at Mon Jun 09 14:43:45 1997