[4090] in java-interest
Re: java-interest-digest V1 #5
daemon@ATHENA.MIT.EDU (Scott Lewis)
Sun Dec 10 16:36:29 1995
Date: Sun, 10 Dec 1995 11:15:41 -0800
To: java-interest@java.sun.com
From: Scott Lewis <slewis@teleport.com>
At 09:59 AM 12/9/95 -0800, you wrote:
>
>java-interest-digest Saturday, 9 December 1995 Volume 01 : Number 005
>
>In this issue:
>
> Implementing a MUD with Java ... BEGINING !!!
> Re: peer classes
> standalone vs browser invocation
> memory allocation pool size
> Re: help!
> Re: String in java
> [Q] getWidth(this), why passing 'this'?
> MenuBars
> Re: VJ Day!
> Re: [Q] getWidth(this), why passing 'this'?
> clipRect() bug? - Help!
> Implementing non-blocking sockets in Netscape
> Re: [Q] getWidth(this), why passing 'this'?
> Re: Java and Hotjava
> Re: [Q] getWidth(this), why passing 'this'?
> How put text in a new panel ???
> Re: standalone vs browser invocation
> How put text in a new frame ???
> Error vs Exception redundancies?
> [none]
> Re: Java and Hotjava
> Re: Java and Hotjava
>
>----------------------------------------------------------------------
>
>From: Joan Maria Mas Ribes <mas@tele.ucl.ac.be>
>Date: Fri, 8 Dec 1995 19:54:17 +0100 (MET)
>Subject: Implementing a MUD with Java ... BEGINING !!!
>
>Hi to everybody :
>
>Well, a week ago I posted a message to java-interest mailing list
>asking if there was anybody interested in programming a MUD in java.
>
>Quite a lot of people is interested on this. We have already started
>discusing a bit about it. We all agreed in one thing, it'll have
>to be something new in the MUD/MOO world ... radically different.
>
>As I said, we have started talking about it, but nothing has really
>started (hopelly next week we will). But now we have a mailing list
>which is going to be the center of our discussions. Yes, I know
>that there is already one java-mud list, but that one is a general
>discussion list. We wouldn't like to waste bandwith of people who
>is not really interested in implementation detail or in our project.
>
>Well, if you are interested in joining us, feel free to do it !!!
>
>Just send a mail to :
>
> majordomo@tele.ucl.ac.be
>
>and in the body of the message :
>
> subscribe insane-asylum your_email_address
>
>And YES, insane-asylum is the name I've given to the mailing list
>(but it was Thomas H. Mancino's idea :-). Why ??? Well, we really
>didn't want to use any of the typycal words like java or mud or moo.
>And secondly, cause I thing all this is a bit crazy, mental illnes,
>starting a project only by means of the Internet and using a new
>language that almost anybody knows (including me and most of the
>people already interested).
>
>This was another reason to start with the project ... this way I'm
>sure I'm gonna learn it to an acceptable level ... and if you combine
>it with a bit of fun (Muds) we've got the PERFECT COCKTAIL !!!
>
>If you've got any questions before subscribing just e-mail me, ok ?
>
>c ya !!! (in the mailing list hopefully)
>
>-
--------------------------------------------------------------------------------
> _/ _/ _/ _/ _/ _/_/ JoanMa MAS RIBES
> _/ _/_/_// _/_/_// _/ _/
> _/ _/ _/_/ _/ _/_/ _/_/ Universite Catholique de Louvain
> _/ _/ _/ _/ _/ _/ _/ _/ Laboratoire de Telecommunications
> _/_/ _/ _/ _/ _/ _/ _/ Batiment Stevin
> 2, Place du Levant
> B-1348 - Louvain La Neuve
>
> mailto:mas@tele.ucl.ac.be Tel.: +32 - (0)10 - 478067
> Fax : +32 - (0)10 - 472089
>
> Security is when everything is settled.
> When nothing can happen to you.
> Security is the denial of life.
>-
--------------------------------------------------------------------------------
>
>------------------------------
>
>From: Sami.Shaio@Eng.Sun.COM (Sami Shaio)
>Date: Fri, 8 Dec 1995 11:51:36 -0800
>Subject: Re: peer classes
>
>The peer classes are there to support alternate implementations of the
>awt (for example we use it to replace the implementation of the components
>with the platform's native components, you can also use them to produce
>java-only implementations of the components).
>
>Unless you want to implement your own awt, you don't need to deal with
>them directly.
>
>- --sami
>
>|From ams@mci.net Fri Dec 8 04:54:59 1995
>|Date: Fri, 8 Dec 1995 07:44:20 -0500 (EST)
>|From: Aaron Shtromas <ams@mci.net>
>|X-Sender: ams@coppi
>|To: java-interest@java
>|Subject: peer classes
>|Mime-Version: 1.0
>|X-Info: To unsubscribe, send 'unsubscribe' to
java-interest-request@java.sun.com
>|
>|hi,
>|
>|of all the things that i'm vague about in java, the awt peer
>|classes are the ones i'm truly ignorant. is there a description
>|of their use somewhere? alternatively, can some kind soul provide
>|one? an example of peer class use would be nice.
>|
>|i also noticed, that posting a request like this, often leads
>|to me finding an answer on my own within half an hour on my own.
>|perhaps, i ought to post more often... ;-)
>|
>|-a
>|
>|----------------------------------------------------------------
>|Aaron Shtromas MCI Internet Engineering
>|ams@mci.net 2100 Reston Parkway
>|Tel. 703-715-7334 Reston, VA 22091
>|
>|-
>|This message was sent to the java-interest mailing list
>|Info: send 'help' to java-interest-request@java.sun.com
>|
>
>------------------------------
>
>From: jshermer@BASISinc.com (Jill Shermer)
>Date: Fri, 8 Dec 1995 11:55:38 -0800
>Subject: standalone vs browser invocation
>
>Hi,
>
>Is there any existing class method in Java beta that will indicate
>whether a class is invoked via java vs html request?
>
>- -Jill Shermer
>jshermer@basisinc.com
>
>------------------------------
>
>From: Larry.W.Lam@Eng.Sun.COM (Larry Lam)
>Date: Fri, 8 Dec 1995 11:59:55 -0800
>Subject: memory allocation pool size
>
>Hi all:
>
>I have a relatively small standalone program that create a lot of
>small objects and I keep getting "OutOfMemeoryError" error.
>I increase the memory allocation pool increment of 4Mb (using -mx
>option in java), and finally the program was able to complete
>with "-mx64m".
>
>Here is the semi-pseudocode of the program:
>
> for (int i = 0; i < 1700; i++) {
> create a Hashtable
> create 200 objects (100 keys and their associated value)
> store the objects (keys and values) into hashtable
> save the hashtable
> // just in case...
> run garbage collection every 100 interations
> }
>
>At the end of this code segement, there are ~340,000 objects stored
>in 1700 hashtables.
>
>Now, here is the puzzle. When I increse the size of the objects, (they
>can be totaled to ~20MB increase in size), the new program was able to
>complete with the same size of memory pool ("-mx64m")!! Any logical
>explanation?
>
>In general, is there any way to estimate memory usage of a java program?
>It would be nice to know the size of a object reference and memory
>overhead for each object so one can preallocate enough memory.
>
>Any information would be appreciated.
>
>larry lam
>
>------------------------------
>
>From: Michael Lorton <mlorton@eshop.com>
>Date: Fri, 8 Dec 1995 13:19:01 -0800
>Subject: Re: help!
>
> Chris> I am going through the hotjava tutorial on Writing an
> Chris> Applet. I created in my home directory (unix) two
> Chris> directories html, classes. I put the Hello.html program in
> Chris> the html directory and HelloWorld.java in the classes
> Chris> directory. Then, I compiled the HelloWorld.java program.
> Chris> No problems so far... Now, I want to run this and see the
> Chris> wonderful results....
>
>I think the two directories you need are html/ and html/classes/
>
>M.
>
>
>------------------------------
>
>From: michael@w3media.com (Michael Mehrle)
>Date: Fri, 8 Dec 1995 13:17:00 -0700
>Subject: Re: String in java
>
>> Java string class does not have a split function
>>
>> Can someone please show me how to break up the following string in
>> code;
>>
>> String "user=smith&password=master"
>>
>> I want to get 4 strings out of this one string.
>>
>>
>> Can you please send me source code
>>
>>-
>
>Yeah! I would appreciate the very same service :) Anybody.
>
>Upon that it shouldn't be so hard to create a generic splitString class
>using a StringBuffer and solve the problem once and for all. By passing the
>string object and the char at which to split, everything could be honky
>dori!
>
>How about it?
>
>Michael
>
>
> \\///
> [ o-o ]
>____________OOOo___(.)___oOOO_______________
>
> http://www.w3media.com/w3media
> michael@w3media.com
> Tel. 310.441.9599
> Fax 310.441.5919
>
>"One man's mundane and desperate existence
> is someone else's Technicolor."
> -Strange Days-
>
>
>
>------------------------------
>
>From: Edith Au <edith@pencom.com>
>Date: Fri, 8 Dec 1995 16:55:10 -0500 (EST)
>Subject: [Q] getWidth(this), why passing 'this'?
>
>Hi,
>
>public class a extends Applet
>{
> Image im;
>
> public void init()
> {
> try
> {
> im = getImage(/* an image */);
> }
> catch (Exception e)
> {}
>
> imWidth = im.getWidth(this);
> }
>}
>
> According to the API, getWidth takes an ImageObserver object as a parameter.
>'this' is an applet. The only common ancestor of Applet and imageObserver is
>Object. How come 'this' can be passed as an mageObserver?
>
>- -Edith
>
>------------------------------
>
>From: robertf@sshare.com (Robert Fox)
>Date: Fri, 8 Dec 95 14:39:50 PST
>Subject: MenuBars
>
>Does anyone have good sample code of implementing a decent MenuBar? I haven't
>found a single Applet using one... I have been playing with it and can't
>seem to get the Frame to actually display the entire MenuBar...
>
>I assume the order of things are:
>
>1) Creating the MenuBar
>2) Creating Menu (s) and adding them onto the MenuBar
>3) Using the addMenuBar function of the Frame
>4) Display the Frame...
>
>any suggestions would be great!
>
>===============================================================================
>Robert Fox
>Software Engineer
>Email: robertf@sshare.com
>
> o o o o o o o . . . ________________________________ _____=======_T___
> o _____ || Softshare | |PH(805)882-2588|
> .][__n_n_|DD[ ====|____ | 136 W. Canon Perdido Suite C | |FX(805)882-2599|
> >(________|__|_[___/_____]_|___Santa Barbara, CA 93101____|_|_______________|_
> _/oo OOOOOO o` ooo ooo 'o^o^o o^o^o` 'o^o o^o`
>-
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
>
>
>------------------------------
>
>From: starck@bridge.net (Alex Starckmann)
>Date: Fri, 8 Dec 1995 05:47:56 -0400
>Subject: Re: VJ Day!
>
>Maybeeeeee ...
>
>But have you read anything about Java in the "Microsoft Internet Strategy"
><www.microsoft.com> ?
>I didn't ...
>
>Alex
>
>
>> Is blackbird off bill list for the day.
>>
>>______________________________ Forward Header
>>__________________________________
>>Subject: Re: VJ Day!
>>Author: owner-java-interest@java.sun.com at INTERNET
>>Date: 12/8/95 10:47 AM
>>
>>
>>>Victory for Java Day!
>>>
>>>(http://java.sun.com/pr-ms.html)
>>>
>>>
>>>> December 7, 1995 - Today Microsoft has announced that it has signed a
>>>> letter of intent with Sun for a Java technology source license and that
>>>> Sun and Microsoft are working through the licensing details. In
>>>> addition, Microsoft has agreed in principle to provide to Sun
>>>> Microsoft's reference implementation of the Java virtual machine and
>>>> AAPI (applet application programming interface) for Windows.
>>>
>>>
>>>
>>>Pat
>>>-
>>>This message was sent to the java-interest mailing list
>>>Info: send 'help' to java-interest-request@java.sun.com
>>
>>
>>I think this is a great move from Gate (who has a lot of problem lately
>>with wall street's big firm ) and the timing of this "deal" is excellent
>>but I'm afraid that this move is only a trick from gates to turn more
>>attention on is browser production. I wouldn't be surprise if a rename
>>"blackbird" would reappear in the near future...
>>
>> -- O
>> --- </\_ Alex
>> -----\/\
>> --- /_
>>
>>
>>-
>>This message was sent to the java-interest mailing list
>>Info: send 'help' to java-interest-request@java.sun.com
>>
>>-
>>This message was sent to the java-interest mailing list
>>Info: send 'help' to java-interest-request@java.sun.com
>
>
>
>------------------------------
>
>From: flar@bendenweyr.Eng.Sun.COM (Jim Graham)
>Date: Fri, 8 Dec 1995 17:28:26 -0800
>Subject: Re: [Q] getWidth(this), why passing 'this'?
>
>> According to the API, getWidth takes an ImageObserver object as a
parameter.
>> 'this' is an applet. The only common ancestor of Applet and imageObserver is
>> Object. How come 'this' can be passed as an mageObserver?
>
>Applet is a subclass of Component which implements ImageObserver as an
>interface.
>
> ...jim
>
>------------------------------
>
>From: Dave Lennert <davel@ibeam.jf.intel.com>
>Date: Fri, 08 Dec 95 17:35:35 PST
>Subject: clipRect() bug? - Help!
>
>During a single update() (screen painting) I want to establish different
>clipping rectangles for the different objects I'm rendering on the screen.
>
>The Graphics class has getClipRect() to retrieve the current setting.
>It has clipRect() to set the clipping rectangle to the *intersection*
>of the current setting and a new rectangle. But it apparently has no
>method to restore (enlarge) the clipping rectangle.
>
>It does have the create() method which supposedly creates a copy of the
>Graphics object that one can call clipRect() against without affecting
>the original Graphics object. This appears to work EXCEPT IN THE
>FOLLOWING CASE.
>
>When the Graphics object is an offscreen Image (for double buffering)
>from Component.createImage(w,h).getGraphics(), the new Graphics object
>returned from create() apparently shares it's clipping rectangle
>settings with the original Image Graphics object. That is, a
>clipRect() on the new Graphics objects affects the old Graphics object
>as well.
>
>Since this works against a regular Graphics object, this sounds like a
>bug. At any rate, is there a way to somehow enlarge the clipping rect
>once you've reduced it?
>
>------------------------------
>
>From: "Steve V. Yalovitser" <root@cyberpunk.com>
>Date: Fri, 8 Dec 1995 20:45:48 +0800 (EST)
>Subject: Implementing non-blocking sockets in Netscape
>
>Hiya All,
>
> Has anyone figured out what netscape's thread model is. And whether/if it
>canbe connected to through java. I have implemented a prototype using
sockets in
>Netscape. However as soon as I call nonblock_io, the bloody thing bus-errors.
>I am guessing they ripped that stuff out and replaced it by their own things.
>So has anyone gotten any clue about where the hooks are. One thing comes to
>mind is to try hitting all the public calls in java-include and see what
>core-dumps... that would be time consuming and Im hoping someone's already done
>it:).Thanks in advance.
>
>------------------------------
>
>From: Pradeep Badri <pbadri@cisco.com>
>Date: Fri, 8 Dec 95 18:02:57 PST
>Subject: Re: [Q] getWidth(this), why passing 'this'?
>
>Hi,
>
>One of the elements in Applet inheritance hierarchy is the
>Component class which implements ImageObserver and provides
>a default implementation. That's the reason why you could pass "this"
>to getWidth() function. You could override it if you want
>your implementation.
>
>cheers,
>- -pb.
>
>Pradeep Badri.
>Cisco Systems.
>
>>
>> Hi,
>>
>> public class a extends Applet
>> {
>> Image im;
>>
>> public void init()
>> {
>> try
>> {
>> im = getImage(/* an image */);
>> }
>> catch (Exception e)
>> {}
>>
>> imWidth = im.getWidth(this);
>> }
>> }
>>
>> According to the API, getWidth takes an ImageObserver object as a
parameter.
>> 'this' is an applet. The only common ancestor of Applet and imageObserver is
>> Object. How come 'this' can be passed as an mageObserver?
>>
>> -Edith
>> -
>> This message was sent to the java-interest mailing list
>> Info: send 'help' to java-interest-request@java.sun.com
>>
>
>
>------------------------------
>
>From: tahmed <tahmed@on.bell.ca>
>Date: Fri, 8 Dec 1995 23:43:00 -0500 (EST)
>Subject: Re: Java and Hotjava
>
>> If Hotjava was made with Java
>>
>> Would it take once day to get the Hotjava
>> browser up to beta???
>>
>> Y is it taking so long?????
> I'm actually pretty disgusted with what's going on with Java.
>Java is awesome, but it's such a stupid mess at the moment. There's
>no bloody solid broswer to test java code with, the confusion between the
>alpha and beta version of the language. Everything should be stablized
>before releasing it. It's all so premature. Sun could port the javac
>binaries to all the UNIX platforms in a week. For crying out loud, Sun
>has muscle, and it's not as if the java compiler produces executeable code.
>They're playing games.
>
>+-=-=-=-=-=-=-=Bell SYGMA Telecom Solutions - Service Assurance-=-=-=-=-=-=-=+
> 160 Elgin St. Room 250. Ottawa, Ontario. K2P 2C4. (613)781-9820 F:567-2482
> inet: tahmed@on.bell.ca IIS: TAHMED HomePage: http://cygnus.igs.net/ratt/
>
>
>------------------------------
>
>From: garya@village.org (Gary Aitken)
>Date: Sat, 9 Dec 1995 00:28:28 -0700
>Subject: Re: [Q] getWidth(this), why passing 'this'?
>
>>public class a extends Applet
>>{
>> Image im;
>>
>> public void init()
>> {
>> try
>> {
>> im = getImage(/* an image */);
>> }
>> catch (Exception e)
>> {}
>>
>> imWidth = im.getWidth(this);
>> }
>>}
>>
>> According to the API, getWidth takes an ImageObserver object as a parameter.
>>'this' is an applet. The only common ancestor of Applet and imageObserver is
>>Object. How come 'this' can be passed as an mageObserver?
>
>Applet is derived (indirectly) from Component, and Component implements
>ImageObserver. One of the characteristics of interfaces is that if a
>class implements an interface, you may pass an object of the class as
>an argument of the interface type. Effectively, only the subpart of the
>class object which deals with implementing the interface is passed.
>
>Gary Aitken garya@village.org
>
>------------------------------
>
>From: Tim Moons <tim@innet.be>
>Date: Sat, 09 Dec 1995 12:33:58 +0100
>Subject: How put text in a new panel ???
>
>This is a multi-part message in MIME format.
>
>- -----------------------------18781610019734
>Content-Type: text/plain; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>
>Hello all,
>
>How can you put text in a new panel ???
>I made a panel with forms(TextFields) and I want to write in front of
>the forms:
>name :
>password :
>
>(If you want to see what I mean, just compile and run the attached
>example !!!)
>(If you use WIN95, just wait 2 minutes, because it starts slowely)
>
>In the basic panel you can use drawString, but what in a self-made panel
>???
>
>Thanks, and until later ....;
>
> Tim Moons .. :-)
>
>Email : tim@innet.be
>Phone : (on monday and thusday) +32 3 281 49 83
>
>- -----------------------------18781610019734
>Content-Type: text/plain; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>Content-Disposition: inline; filename="submit.java"
>
>/* Submition for username and password !!! */
>/* 09-12-1995 Tim Moons INnet n.v. */
>
>
>import java.awt.*;
>import java.applet.*;
>
>public class submit extends Applet {
> Panel infobar;
> Panel mainbar;
> TextField name;
> TextField password;
>
> public void init() {
> resize(250,125);
> setLayout(new BorderLayout());
> setBackground(Color.gray);
> setFont(new Font("Helvetica", Font.BOLD, 12));
> }
>
> public void start() {
> name = new TextField();
> password = new TextField();
>
> Panel p = new Panel();
> p.setLayout(new BorderLayout());
> p.add("North", name);
> p.add("South", password);
>
> mainbar = new Panel();
> mainbar.setLayout(new BorderLayout());
> mainbar.add("Center", p);
> add("Center", mainbar);
>
> Button Submit = new Button("Submit");
> Button Clear = new Button("Clear");
>
> infobar = new Panel();
> infobar.add(Submit);
> infobar.add(Clear);
> add("South", infobar);
> }
>
> public boolean action(Event evt, Object arg) {
> if("Submit".equals(arg)) {
> showStatus("If this worked... the data would be submitting");
> return true;
> } else if("Clear".equals(arg)) {
> name.setText("");
> password.setText("");
> return true;
> }
> return false;
> }
>}
>
>- -----------------------------18781610019734--
>
>
>------------------------------
>
>From: suresh@thomtech.com (Suresh Srinivasan)
>Date: Sat, 9 Dec 1995 06:50:39 -0500
>Subject: Re: standalone vs browser invocation
>
>> From: jshermer@BASISinc.com (Jill Shermer)
>> To: java-interest@java.sun.com
>>
>> Is there any existing class method in Java beta that will indicate
>> whether a class is invoked via java vs html request?
>>
>
>I had the same situation and I ended up using a different
>constructor. Initialization via HTML calls the null
>constructor. For example:
>
>class Foo extends java.applet.Applet {
> boolean fromJava = false;
>
> public Foo(boolean how) {
> fromJava = how; // set to true if called from Java
> ...
> }
> ...
>}
>
>Perhaps there's a better way?
>
>- --Suresh
>
>------------------------------
>
>From: Tim Moons <tim@innet.be>
>Date: Sat, 09 Dec 1995 13:14:57 +0100
>Subject: How put text in a new frame ???
>
>This is a multi-part message in MIME format.
>
>- -----------------------------48912542327764
>Content-Type: text/plain; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>
>Hello,
>
>Sorry, but this is the correct one, in the mail : "How put text in a new
>panel ???" I gave the wrong explenation.
>The attached text was also wrong, this is the correct one.
>Compile and run it.
>
>It is an applet that randomly searches for the amount of days and amout
>of hours which are still pending from the account. Later, the randoms
>are replaced by the information given by a server.
>
>In a new frame there are in 3 TextFields with messages.
>
>How can I write some text on the frame ??? In front of each TextField
>are on the top the TextFields for example.
>Repaint and drawString won't work. What can I do ???
>
>Thanks,
>
> Tim Moons........
>
>Email : tim@innet.be
>Phone : (on monday and thusday) +32 3 281 49 83
>
>- -----------------------------48912542327764
>Content-Type: text/plain; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>Content-Disposition: inline; filename="testframe.java"
>
>import java.awt.*;
>import java.io.*;
>import java.lang.*;
>import java.lang.Math;
>
>class account_type {
> public int number() {
> int numb=0;
> numb=(int)(1 + Math.round(Math.random()));
> return(numb);
> }
>
> public int day_count() {
> int numb_day=0;
> numb_day=(int)(Math.round(365*Math.random()));
> return(numb_day);
> }
>
> public String hour_count() {
> int numb_hour=0, numb_min=0, numb_sec=0;
> String time="", hours="", min="", sec="";
>
> numb_hour=(int)(Math.round(20*Math.random()));
> numb_min=(int)(Math.round(59*Math.random()));
> numb_sec=(int)(Math.round(59*Math.random()));
>
> if (numb_hour<10) {
> hours=("0" + String.valueOf(numb_hour));
> } else {
> hours=String.valueOf(numb_hour);
> }
> if (numb_min<10) {
> min=("0" + String.valueOf(numb_min));
> } else {
> min=String.valueOf(numb_min);
> }
> if (numb_sec<10) {
> sec=("0" + String.valueOf(numb_sec));
> } else {
> sec=String.valueOf(numb_sec);
> }
>
> time=(hours + " : " + min + " : " + sec);
>
> return(time);
> }
>}
>
>
>
>class drawframe extends Frame {
> Frame fr = new Frame("Online account-information !!!!!");
> Panel p = new Panel();
> Button b;
> TextField tf, term, info;
> Font font;
> private String still_over, account_info;
>
> drawframe(String type, int day_count, String hour_count) {
> add("Center", fr);
> fr.resize(785,105);
>
> p.setLayout(new BorderLayout());
> fr.add("Center", p);
>
> tf=new TextField("hier komt de account-informatie : " + type);
> tf.setEditable(false);
> p.add("North", tf);
>
> font = new Font("Helvetica", Font.BOLD, 24);
> if ("U hebt een jaar-account !".equals(type)) {
> if (day_count > 334) account_info="Wees gerust, u kan nog meer als 11
maanden werken !!!";
> if ((day_count <= 334) && (day_count > 303)) account_info="Wees
gerust, u kan nog meer als 10 maanden werken !!!";
> if ((day_count <= 303) && (day_count > 272)) account_info="Wees
gerust, u kan nog meer als 9 maanden werken !!!";
> if ((day_count <= 272) && (day_count > 242)) account_info="Wees
gerust, u kan nog meer als 8 maanden werken !!!";
> if ((day_count <= 242) && (day_count > 211)) account_info="Wees
gerust, u kan nog meer als 7 maanden werken !!!";
> if ((day_count <= 211) && (day_count > 181)) account_info="Wees
gerust, u kan nog meer als 6 maanden werken !!!";
> if ((day_count <= 181) && (day_count > 150)) account_info="Wees
gerust, u kan nog meer als 5 maanden werken !!!";
> if ((day_count <= 150) && (day_count > 119)) account_info="Wees
gerust, u kan nog meer als 4 maanden werken !!!";
> if ((day_count <= 119) && (day_count > 89)) account_info="u kan nog
meer als 3 maanden werken !!!";
> if ((day_count <= 89) && (day_count > 59)) account_info="u kan nog
meer als 2 maanden werken !!!";
> if ((day_count <= 59) && (day_count > 30)) account_info="u kan nog
meer als 1 maanden werken !!!";
> if ((day_count <= 30) && (day_count > 0)) account_info="OPGEPAST !!!!
U zit in uw LAATSTE maand !! BIJBESTELLEN !!";
> } else {
> account_info = "U hebt een uur-account ?!?!?!?!?!!!!!!";
> }
> info=new TextField(account_info);
> info.setFont(font);
> info.setEditable(false);
> p.add("Center", info);
>
> term = new TextField();
> if ("U hebt een jaar-account !".equals(type)) {
> still_over="U beschikt nog over " + day_count + " dagen.";
> } else {
> still_over="U beschikt nog over " + hour_count + " uren.";
> }
> term.setText(still_over);
> term.setEditable(false);
> p.add("South", term);
>
> b=new Button("Gelukt");
> fr.add("South", b);
>
> fr.show();
> }
>
> public boolean handleEvent(Event e) {
> if (e.id==Event.WINDOW_DESTROY || (e.id==Event.ACTION_EVENT &&
"Gelukt".equals(e.arg))) {
> hide();
> p.remove(b);
> p.remove(tf);
> remove(p);
> dispose();
> return(true);
> }
> return(false);
> }
>}
>
>public class testframe extends java.applet.Applet {
> int number, day_count;
> String hour_count;
> String type;
>
> public void init() {
> resize(500,500);
>
> account_type year_hour=new account_type();
> number=year_hour.number();
> switch (number) {
> case 1 : type="U hebt een jaar-account !";
> break;
> case 2 : type="U hebt een uur-account !";
> break;
> }
>
> day_count=year_hour.day_count();
> hour_count=year_hour.hour_count();
>
> drawframe drfr = new drawframe(type, day_count, hour_count);
>
> repaint();
> }
>
> public void paint(Graphics g) {
> g.drawString("Aantal dagen : " + day_count,5,30);
> g.drawString("Aantal uren : " + hour_count,5,45);
> }
>}
>
>- -----------------------------48912542327764--
>
>
>------------------------------
>
>From: MikeDacon@aol.com
>Date: Sat, 9 Dec 1995 11:20:17 -0500
>Subject: Error vs Exception redundancies?
>
>Hi fellow Java coders and Java team,
>
>The exceptions:
> ClassNotFoundException
> NoSuchMethodException
>
>seem to be redundant since these Errors exist:
> NoClassDefFoundError
> NoSuchMethodError
>
>Can someone tell me the difference?
>
> - Mike Daconta
>
>------------------------------
>
>From: Countach <karim@enuxsa.eas.asu.edu>
>Date: Sat, 9 Dec 1995 09:42:53 -0700 (MST)
>Subject: [none]
>
>subsribe
>
>Fariaz Karim
>
>
>------------------------------
>
>From: Charles Lowell <cowboyd@hougen.che.utexas.edu>
>Date: Sat, 9 Dec 1995 11:33:46 -0600 (CST)
>Subject: Re: Java and Hotjava
>
>a wise man once said:
> "he who puts his product on the market first sets the standard"
>
>And it is because java has already been so widely accepted that microsoft
>knuckled under last thursday. It's better for SUN to have introduced a
>fledgling java with problems, than to have its authority as a standard
>challenged my some one as universally loathed as microsoft.
> We have many things to be thankful for.
>charlie
>
>On Fri, 8 Dec 1995, tahmed wrote:
>
>>
>> > If Hotjava was made with Java
>> >
>> > Would it take once day to get the Hotjava
>> > browser up to beta???
>> >
>> > Y is it taking so long?????
>> I'm actually pretty disgusted with what's going on with Java.
>> Java is awesome, but it's such a stupid mess at the moment. There's
>> no bloody solid broswer to test java code with, the confusion between the
>> alpha and beta version of the language. Everything should be stablized
>> before releasing it. It's all so premature. Sun could port the javac
>> binaries to all the UNIX platforms in a week. For crying out loud, Sun
>> has muscle, and it's not as if the java compiler produces executeable code.
>> They're playing games.
>>
>> +-=-=-=-=-=-=-=Bell SYGMA Telecom Solutions - Service
Assurance-=-=-=-=-=-=-=+
>> 160 Elgin St. Room 250. Ottawa, Ontario. K2P 2C4. (613)781-9820 F:567-2482
>> inet: tahmed@on.bell.ca IIS: TAHMED HomePage: http://cygnus.igs.net/ratt/
>>
>> -
>> This message was sent to the java-interest mailing list
>> Info: send 'help' to java-interest-request@java.sun.com
>>
>
>------------------------------
>
>From: "Fumihiko \"Miko\" Matsumura" <miko@well.com>
>Date: Sat, 9 Dec 1995 09:58:33 -0800 (PST)
>Subject: Re: Java and Hotjava
>
>I just want to try to clarify a little bit according to my understanding:
>
>> > If Hotjava was made with Java
>> >
>> > Would it take once day to get the Hotjava
>> > browser up to beta???
>
>Actually, the HotJava Alpha compiler was released as a demonstration of
>java's power. Arthur Van Hoff is busy rewriting the thing from the ground
>up to support Beta and doing it right this time. He's a good programmer,
>and we all can look forward to an amazing browser.
>
>> I'm actually pretty disgusted with what's going on with Java.
>> Java is awesome, but it's such a stupid mess at the moment. There's
>> no bloody solid broswer to test java code with, the confusion between the
>> alpha and beta version of the language. Everything should be stablized
>> before releasing it. It's all so premature.
>
>That's exactly the point. Java is not a released product! I think it
>would be best for everyone to either 1) write beta code, warts and all
>or 2) wait for the release version. Seriously, the word "beta" means that
>it's not perfect. I'm not trying to be a SUN apologist or anything, but
>I'm in favor of SUN releasing as much new technology as quickly as they
>can--and if it's ugly, I'd better wait until the actual released product.
>
>> Sun could port the javac
>> binaries to all the UNIX platforms in a week. For crying out loud, Sun
>> has muscle, and it's not as if the java compiler produces executeable code.
>> They're playing games.
>
>Having visited the Java team down in Palo Alto, I can assure you that
>they are not playing games. They are admittedly understaffed (I encourage
>people in this list to check out http://java.sun.com/openings.html and
>apply for any of the new postitions on the java team) and
>are all working 80 hours a week to create a good thing for all of us.
>The transition from alpha to beta broke my applets too. And I was
>confused to find no hotjava for beta. But I dont blame the java team.
>
>Another distinction that I want to make is (Java_team != SUN) evaluates
>to true. I dont want anyone out there who hasn't been down to visit them
>to think that the whole of SUN Microsystems is behind the java team.
>True, all of the java team are SUN employees, but if there's a fault, it
>might only be that the "rest of SUN" is not moving quickly enough to
>support these innovators.
>
>I would also like to see the javac binaries ported to other systems. My
>main machine is an HP! But the source codes are publically available, so
>I think any member of the Internet community is free to port it to any
>system they want.
>
>I didnt intend to write such a long post. Since I have visited the java
>team, I know that they are not playing any games, and they are really
>working their hardest to keep the "disgust" level to a minimum. I think
>they deserve some thanks, frankly.
>
>Please post replies to this message
>back to me, NOT to the list. I'd rather have list traffic dedicated to
>the important task of implementing java than anything else. On the other
>hand, if you have some constructive criticism, I'd be glad to add my
>voice to yours next time I'm down at the PAL II building talking to them.
>
>Miko Matsumura
>Java engineer
>HotWired
>
>
>------------------------------
>
>End of java-interest-digest V1 #5
>*********************************
>
>
>
Scott Lewis
Intel Corporation
Work email: Scott_B_Lewis@ccm.jf.intel.com
Home email: slewis@teleport.com
Phone: 503.264.7047
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com