[3928] in java-interest
Re: java-interest-digest V1 #282
daemon@ATHENA.MIT.EDU (alex matijaca)
Mon Dec 4 00:49:16 1995
Date: Sun, 03 Dec 1995 21:42:14 -0500
To: java-interest@java.sun.com
From: alex matijaca <alex@dztech.com>
At 09:08 AM 12/3/95 -0800, you wrote:
>java-interest-digest Sunday, 3 December 1995 Volume 01 : Number 282
>
>In this issue:
>
> Re: Infamous "Applet not initialized", but it's the code this time
> Re: Java for Macintosh
> Re: NetScape CLASSPATH variable
> Translation request
> Public Java Compiler Redux
> Distributed Objects in Java?
> Re: Mutually-referential classes ?
> Java User Group in Toronto
> Bouncing Icon on a web page
> Help !
> Re: Event gobbling?
> Input on Book Subject Matter Requested
> [none]
> [none]
> [none]
> [none]
> [none]
> [none]
> [none]
> "apllet not initialized" again!
> Overriden Methods
> events in TextField
> Need a help
> parsing?
> Why interface methods must be public?
> Re: Fundamental question - threads
> Multiple toolkits and peers
> Re: setIconImage
> Count
> Creating an AppletStub and AppletContext
> CropImageFilter class
> Re: Thread Scheduling in Win32
>
>----------------------------------------------------------------------
>
>From: valcarc@sbcidev.ny.us.swissbank.com (Carlos Valcarcel)
>Date: Fri, 1 Dec 95 08:30:39 EST
>Subject: Re: Infamous "Applet not initialized", but it's the code this time
>
>>> creation method and when the finalize method go off. I know my
>>> CLASSPATH is set correctly because I can run other applets. I also
>>> have the .HTML, .JAVA, and .CLASS files in the same directory, as I
>>> have done with the other applets that run. Can anyone see anything
>
>I thought you should not have the .html and .class files at
>the same level. I know you are not supposed to start hotjava
>from the classes directory because of problems. I think that
>might extend to having the .html and the .class at the same
>level (directory) as well.
>
>Move you .html files up above the classes directory and see
>what happens!
>
>Carlos Valcarcel
>
>
>------------------------------
>
>From: valcarc@sbcidev.ny.us.swissbank.com (Carlos Valcarcel)
>Date: Fri, 1 Dec 95 08:45:23 EST
>Subject: Re: Java for Macintosh
>
>The Mac release of Java is scheduled for 1st Quarter
>next year (at least that's what I've heard).
>
>The only way to learn how to program in Java is to download
>the Sun Java documentation, read it and start hacking.
>If you have access to the World Wide Web there are a number
>of sites you can go to that will lead you to example code.
>
>Try
>
>http://www.gamelan.com
>
>to start with. Good luck! Don't lose faith when you see
>how much information there is to digest. Remember, everyone
>was a beginner once!
>
>Carlos Valcarcel
>
>p.s. To the other newbies: please read the list for at least
>a few days before posting to it. Most beginners' questions and answers
>come up rather frequently so you will get the information
>you need eventually. Again, if you have access to the Web then surf
>to your heart's content (beginning with Yahoo, if possible).
>
>===================================================================
>"To infinity...and beyond!" -- Buzz Lightyear
>===================================================================
>
>------------------------------
>
>From: "R.Volkmann" <m224873@svxtrm14.mdc.com>
>Date: Fri, 1 Dec 1995 08:31:55 -0600
>Subject: Re: NetScape CLASSPATH variable
>
>>> Date: Thu, 30 Nov 1995 12:47:36 -0600
>>> From: "R.Volkmann" <m224873@svxtrm14.mdc.com>
>>>
>>> >Date: Thu, 30 Nov 1995 07:35:21 +0100
>>> >From: fabio.poroli@Swiss.Sun.COM (Fabio Poroli - Sun Switzerland Zurich
- Sales)
>>> > I have some troubles running my Netscape 2 beta 2 Java applets.
>>> >Every time I look at a page with an applet, I become the following
>>> >message
>>> >
>>> > "Unable to start a java applet: Can't find 'moz2_0.car' in your CLASSPATH.
>>> > Read the release notes and install 'moz2_0.car'properly before
restarting.
>>> > Current Value of CLASSPATH:
>>> >
~/JAVA/java/classes:moz2_0.car:.:classes:/usr/local/netscape/java/classes/mo
z2_0.car:~/.netscape/moz2_0.car"
>>> >
>>> > "VERIFIER ERROR java/lag/ThreadGroup.Suspend()V: Illegal use of
nonvirtual function call".
>>> >
>>> >My CLASSPATH variable is set only to ~/JAVA/java/classes.
>>> >Can somebody help me ?
>>>
>>> I see a theme developing here. These kinds of questions are asked several
>>> times daily and they never get answered. Is this information on a web page
>>> somewhere and us beginners are just missing it? I am surprised that Sun
>>> doesn't jump in and set us straight before we get discouraged and just stop
>>> trying. Would things be a lot better if we stop trying to get Netscape to
>>> work for now and just use HotJava?
>
>>Date: Thu, 30 Nov 1995 14:26:14 -0800
>>From: lindholm@scndprsn.Eng.Sun.COM (Tim Lindholm)
>>
>>Perhaps Sun doesn't jump in because these are problems with Netscape
>>Navigator, and people from Sun don't necessarily have any special insight
>>into that product!
>
>Still, the result is the same. People will give up and stop trying to
>work with Java eventually if they can't make any progress with using it.
>
>|------------------------------------------------------------|
>| R. Mark Volkmann - Principal Specialist Programmer/Analyst |
>| McDonnell Douglas Aerospace, St. Louis, Missouri, USA |
>| email m224873@svmstr01.mdc.com, voice (314)232-0498 |
>|------------------------------------------------------------|
>"As the evening sky faded from a salmon color to a sort of flint gray,
> I thought back to the salmon I caught that morning, and how gray he was,
> and how I named him Flint." from Deep Thoughts by Jack Handy
>
>------------------------------
>
>From: Judy Mackenzie <cqg!judym@uucp-1.csn.net>
>Date: Fri, 1 Dec 95 7:20:16 MST
>Subject: Translation request
>
>You may lready have a reply by now, as your request was forwarded to
>me by my brother, but here's my suggestions anyway!:
>Estoy trabajando con un programa que maneja cadenas y
>I am working with a program which manages (handles) strings and
>Estoy teniendo problemas con el metodo substring de la clase String
>I am having problems with the substring method of the string class.
>(or string type)
>He aqui el metodo substring de la clase string
>here is the substring method for the string clase (type)
>Inicio de la clase string
>Start of the string class (type)
>Hope this helps...!!
>
>------------------------------
>
>From: "Elliotte Rusty Harold" <Elliotte@blackstar.com>
>Date: Fri, 1 Dec 1995 10:31:28 EST
>Subject: Public Java Compiler Redux
>
>I found a bug in the public java compiler I announced yesterday.
>That bug has since been fixed. People who tried to use the compiler
>in the last 24 hours weren't able to retrieve their compiled .class
>files.
>
> In short I had moved the temporary directory where files were
>compiled onto a separate partition. However I neglected to change
>the links to the class files. Thus files were compiled but the links
>to the compiled files were invalid. This has since been fixed, and
>serves as yet another cautionary tale about the need for testing
>EVERYTHING when you make even the littlest changes to the code.
>
>- --
>Elliotte Rusty Harold Black Star Publishing Co., Inc.
>elliotte@blackstar.com 116 East 27th Street
>elharo@shock.njit.edu NY NY 10016
>
>------------------------------
>
>From: Thomas Riechmann <Thomas.Riechmann@informatik.uni-erlangen.de>
>Date: Fri, 1 Dec 1995 15:38:39 GMT
>Subject: Distributed Objects in Java?
>
>Hi,
>
>has anyone thought about implementing remote method calls into Java?
>
>I think it would be great, if I could program distributed applications
>in Java using the method-call mechanism (and not with low-level
>mechanisms like sockets etc.) for method-invocations on objects on
>other hosts.
>
>Then client-server applications could be implemented very easy using
>Java-server processes and Java-clients.
>
>
>Ciao
>
> Thomas Riechmann
> (Thomas.Riechmann@informatik.uni-erlangen.de)
>
>
>
>
>/-------------------------------------------------------------\
>| WWW: http://www4.informatik.uni-erlangen.de/~riechman/ |
>| Phone: +49/9131/85-7269 |
>| Fax: +49/9131/85-8732 |
>| Thomas Riechmann - Martensstr.1 - D-91058 Erlangen |
>\-------------------------------------------------------------/
>
>------------------------------
>
>From: Per Danvind <perry@cdt.luth.se>
>Date: Fri, 01 Dec 1995 16:39:42 +0100
>Subject: Re: Mutually-referential classes ?
>
>Hi Bob...
>
>> I saw some words on this in older postings, but no answer, so I'll ask
again...
>>
>> Suppose I have two classes that refer to each other (eg, ClassA and ClassB;
>> ClassA has a ClassB instance variable and invokes methods in that instance;
>> ClassB has methods that take ClassA arguments). Both need to be public
>> classes (so they can be inherited from in different packages). Can this be
>> done in Java? The rules seem to be that public classes must be contained in
>> separate .java files; however, you can't import a class before it's compiled
>> and each class needs the other to be compiled first. Is there some way
>> around this?
>>
>> This is easy (and not uncommon) in C++ code, and it works fine in
Smalltalk ...
>> --
>> Bob Beck rbk@ibeam.intel.com CompuServe: 71674,106
>> Intel Corporation (503)264-8856 AOL: RDBeck
>
>It is very easy in Java too. Have you tried it?
>
>This simple program should do what you want...
>
>public class ABTest {
>
> public static void main(String args[]) {
> A a = new A("Joe");
> a.print();
> }
>}
>
>public class A {
>
> B b;
> public String name;
>
> public A(String str) {
> this.name = new String(str);
> this.b = new B("Child of "+str);
> }
>
> public void print() {
> System.out.println("Entering print in A...");
> System.out.println("This is '"+this.name+"'.");
> b.print(this);
> System.out.println("... exiting print in A.");
> }
>}
>
>public class B {
>
> String name;
>
> public B(String str) {
> this.name = new String(str);
> }
>
> public void print(A a) {
> System.out.println("Entering print in B...");
> System.out.println("My owner is '"+a.name+"'.");
> System.out.println("... exiting print in B.");
> }
>}
>
>- --
>Per
>
>
>------------------------------
>
>From: Marko Gargenta <mgargent@undergrad.math.uwaterloo.ca>
>Date: Fri, 1 Dec 1995 11:32:37 -0500 (EST)
>Subject: Java User Group in Toronto
>
>I hear there is a Java user group in Toronto. Does anyone know anything
>about this?
>
>- ---------------------------
>Marko Gargenta
>University of Waterloo
>Marko.Gargenta@uWaterloo.Ca
>
>
>------------------------------
>
>From: Edith Au <edith@pencom.com>
>Date: Fri, 1 Dec 1995 11:37:36 -0500 (EST)
>Subject: Bouncing Icon on a web page
>
>Hi,
>
> I have an applet idea but have trouble to implement it.
>The idea is to have a little icon bouncing on a web page. Someething
>similar to the bouncing head from the demo. But instead of bouncing in
>a frame, I would like to have it bouncing on a web page.
>
> I am stuck at a point that I do not know how to keep track of the
>image of a web page.
>
> If I want an applet floating on an image (say a gif), that's easy. All
>I have to do is to repaint the exposed part of the image. However, a web
>page can have multiple images and text, that makes things complicated.
>
> I was thinking about passing the target web page as a param of an applet.
>Then draw an offscreen image of that web page.... But then I need to process
>the html page myself. I don't think it is a good solution unless there is
>an API can do the job.
>
>
> Any good suggestion?
>
>Cheers,
>Edith
>
>==============================================================================
>Edith Au Tel: (212) 513 7777
>WWW Specialist Email: edith@pencom.com
>Pencom Systems Incorporated WWW: http://www.pencomsi.com/~edith
>40 Fulton Street,
>NY, NY 10038
>===============================================================================
>
>------------------------------
>
>From: acobley@mic.dundee.ac.uk (Andy Cobley)
>Date: Fri, 1 Dec 95 12:22:34 GMT
>Subject: Help !
>
>Ok,
>
>I am new to all this so I hope this is acceptable use of the list.
>I am just getting into this java programming but have hit that brick wall
>type thing. Could someone please have a look at the code below and tell me
>whats wrong. Whenever I runit I get the Exception "failed to load picture"
>
>So first of all
>
>1: Is this code even nearly correct ?
>2: How do I find what the actual error is (kinda like perror in C)
>
>Thanks for your time !
>
>Andy C
>- ----------------------------------------------------------------------
>
>import java.awt.Graphics;
>import java.awt.Image;
>import java.net.*;
>
>class SaleableObject extends java.applet.Applet{
> private int price;
> private String Name;
> private String Picture;
> private int x,y;
> private int width=50;
> private int height=50;
> private URL ImageURL;
> private Image myImage;
>
>
>
> public int getPrice(){
> return(price);
> }
>
> public String getName(){
> return(Name);
> }
>
> public void DisplayObject(Graphics context){
> context.drawString(Name,x,y) ;
> }
>
> SaleableObject() {}
>
>
> SaleableObject(int NewPrice, String newName, int newX, int newY,String
>PicyName){
> price=NewPrice;
> Name=newName;
> x=newX;
> y=newY;
> Picture=PicyName;
> System.out.println("Creating Object");
> try {
> ImageURL = new URL("http","alpha.mic.dundee.ac.uk/ft/", Picture);
>
> }catch (Exception e) {
> showStatus("Bad URL");
> }
> if (ImageURL == null)
> System.out.println("URL is Null !");
>
>
> if (ImageURL != null) {
> try {
> myImage = getImage(ImageURL);
> }catch (Exception e) {
> System.out.println("Failed to load picture
>"+ImageURL.toExternalForm());
> }
> }
>/*
>
>*/
> }
>
> public boolean IsItMe(int xpos, int ypos){
>
> if ((xpos > x) &&(xpos < (x+width)))
> if ((ypos > y) &&(ypos <(y+height)))
> return(true);
> return(false);
> }
>}
>
>
>Andy Cobley
>acobley@mic.dundee.ac.uk
>http://alpha.mic.dundee.ac.uk
>
>
>------------------------------
>
>From: Sami.Shaio@Eng.Sun.COM (Sami Shaio)
>Date: Fri, 1 Dec 1995 10:34:13 -0800
>Subject: Re: Event gobbling?
>
>|From garya@village.org Thu Nov 30 19:37:10 1995
>|Date: Thu, 30 Nov 1995 19:48:01 -0700
>|Arthur and Sami:
>|
>|This question comes up about once a week. Can one of you please enlighten us
>|all as to what the mechanism is which is causing this? The events aren't
>|getting delivered by the normal mechanism. If it's a bug which is going
to be
>|corrected, just say so.
>
>It is a bug that is going to be corrected as we've said many times on
>this list.
>
>- --sami
>
>
>
>------------------------------
>
>From: David.Geary@Central.Sun.COM (David Geary)
>Date: Fri, 1 Dec 1995 11:50:05 -0700
>Subject: Input on Book Subject Matter Requested
>
> I'm in the (very) early stages of writing a Java book. The book will cover
>object-oriented aspects of Java development with an emphasis on GUI design.
>The audience I'm targeting consists of folks who have a good understanding
>of the basics of OO design/development.
>
> My original thought was to develop an application, and chronicle its
>development in the book. I figured an added bonus would be to gear the
>app towards something that readers would find useful. To this end, I've
>considered writing a Smalltalk-like class browser and/or a Javaized OOD
>diagramming tool.
>
> Subsequently, it has occurred to me that perhaps a suite of GUI components
>would be more useful to readers than an application. With the advent of
>Borland/MetroWerks/etc. announcements of Java development environments, it
>is very possible that their environments would make an application along the
>lines proposed above obsolete, or at least less useful to readers than I had
>originally envisioned.
>
> As a result of my dilemma, I turn to the Java masses: Would you rather
>see the book chronicle an application along the lines proposed above, or
>a suite of GUI components? If the former, what application would you like
>to see developed; if the latter, what components would you like to see
>included?
>
> Thanks.
>
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> David Geary "But still I fear
> geary@rmtc.Central.Sun.COM And still I dare not laugh at the madman"
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>------------------------------
>
>From:
>Date:
>Subject: [none]
>
>
>------------------------------
>
>From:
>Date:
>Subject: [none]
>
>
>------------------------------
>
>From:
>Date:
>Subject: [none]
>
>
>------------------------------
>
>From:
>Date:
>Subject: [none]
>
>
>------------------------------
>
>From:
>Date:
>Subject: [none]
>
>
>------------------------------
>
>From:
>Date:
>Subject: [none]
>
>
>------------------------------
>
>From:
>Date:
>Subject: [none]
>
>
>------------------------------
>
>From: Carl <cam59976@bayou.uh.edu>
>Date: Fri, 01 Dec 1995 18:14:08 -0600
>Subject: "apllet not initialized" again!
>
>I got netscape2.0 beta 3 and it still doesn't work.
>I still get the "apllet not initialized"
>
>someone said it won't work from the local disk.
>I'm gonna put it on a server to see if it works.
>
>has anyone got it to work from their local disk?
>if so, I'd like to know how.
THIS IS TRUE!! I have never been able to load any
applets off of file:/// type URL either. I also have
WebSite (httpd for Windows NT), and the same URL works
just fine -> http://127.0.0.1/mypath/mypage.html ....
I wish that Netscape would document this in their read
file, together with the stuff for casual users.
I have however found something else with Netscape, and that is,
that it occasionaly will hang up my SoundBlaster drivers, so that
(after I open up some pages with java applets that use sounds)
even after I exit Netscape, the sound is gone, I have to reboot
the machine...
Regards, Alex. Matijaca
Toronto, Ontario.
>
>------------------------------
>
>From: boomer@mikeboom.com (Michael L. Boom)
>Date: Sat, 02 Dec 1995 01:34:49 GMT
>Subject: Overriden Methods
>
>If I override a method how do I call the base classes method that I
>have overriden. Ex: ::method in C++. I am going to override the
>handleEvent method in the Component class but I do not want to include
>all of the functionality of the old handleEvent like calling
>mouseDown, etc. How do I call the Component.handleEvent.
>
>------------------------------
>
>From: "Michael L. Boom" <boomer@mikeboom.com>
>Date: Fri, 1 Dec 1995 22:42:01 +0000
>Subject: events in TextField
>
> I want to handle the keyDown event for the TextField. I have derived
>a class and tried to override its keyDown, handleEvent and even its
>postEvent with no luck. What is handling the event if postEvent is
>not getting called. I bet is has something to do with the Peer that
>I see all through the code but can find no documentation on.
> How do I get events for the TextField component before anything
>else and what is this Peer stuff that I keep seeing in the source
>code?
>
>------------------------------
>
>From: vitaly@diogen.asc.rssi.ru (Vitaly Promislov)
>Date: Sat, 2 Dec 95 16:15:09 ???
>Subject: Need a help
>
>Hi I am new in Java and have spend some time on very
>simple thing I would like to draw only part (Upper left corner)
>of the Image. To do
>It I use following code fragment:
>
>{
> int n=0;
> int wn=wi/5;
> int hn=hi/5;
> CropImageFilter partFilter= new CropImageFilter(0,0,wn,hn);
> part=createImage(new FilteredImageSource(
> img.getSource(),partFilter));
>
> g.drawImage(part, x, y, w, h, this);
> }
>But nothing happendes.
>If I try simply to draw entierly image:
>as
> g.drawImage(img, x, y, w, h, this);
>evrethin OK.
>
>
> Thank you
> Vitaly.
>______________________________________________________________________
>Vitaly Promislov
>Astro Space Center, Russia e-mail: vitaly@diogen.asc.rssi.ru
> fax: 095 333-23-78
> Phone: 333-23-12
>- ----------------------------------------------------------------------
>
>
>------------------------------
>
>From: ramkriss@cs.purdue.edu (Sriram Ramkrishna)
>Date: Sat, 2 Dec 1995 14:13:46 -0500
>Subject: parsing?
>
>Out of curiosity, what kind of parsing of tokens is Java doing? In the
>white paper, it just said that after the white spaces and coments rae
>taken out, "as usual, this translation works from left to right, and as
>usual, the longest possible match is chosen at each step." However
>previously it said that if you had tokens like a--b, it would take
>a,--,b rather than a,-,-,b, is how does it figure out '--'? Is it an LR
>parser? Or is it a unique parser that isn't covered in any text book?
>
>Thanks..
>
> sri
>[--------------------------------------------------------------------------
----]
>Name : Sri Ramkrishna
>Position : Lab Consultant
>Department: Purdue University Computer Science Dept.
>Email : ramkriss@cs.purdue.edu
>[--------------------------------------------------------------------------
----]
>
>------------------------------
>
>From: pfu.fujitsu.co.jp!satoo@fujitsuI.fujitsu.com (satoh-HAL-osamu)
>Date: Sun, 03 Dec 1995 04:57:05 +0900
>Subject: Why interface methods must be public?
>
>Hey wizards,
>
>I'm wondering why methods declared in interface must be
>public. I think it may cause access control problem.
>
>Imagine that you want to create a "friendry" inteface in a
>package. You can declare an interface like below:
>
>package a;
>interface FriendryInterface {
> void friendryMethod();
>}
>
>And you want to create a "public" class in that package
>which implements that friendry interface:
>
>package a;
>public class PublicClass implements FriendryInterface {
> public void friendryMethod() {
> // implementation of friendryMethod()
> }
>}
>
>Since javac complains when firendryMethod() is not declared
>as public, it is nessesary to declare this method as public.
>
>PublicClass is declared as public, and friendryMethod()
>of PublicClass is also declared as public. So any class
>outside of the package can use friendryMethod()...
>
>Any way to do it? Or shouldn't I do such thing?
>
>I'm working on JDK 1.0 beta running on Solaris, if it helps.
>
>Thanx in advance,
>
>OSAMU Satoh
>PFU Ltd., Tokyo, Japan.
>satoo@pfu.fujitsu.co.jp
>
>------------------------------
>
>From: michael@w3media.com (Michael Mehrle)
>Date: Sat, 2 Dec 1995 12:29:51 -0700
>Subject: Re: Fundamental question - threads
>
>>On Sat, 2 Dec 1995, Daniel Nofal wrote:
>>
>>> Not only that, but there is a much more fundamental problem in regards of
>>> preemptive multitasking on the Mac.
>
>For all I know, you should never write Java code that relies on
>time-sharing -- this will practically guarantee that your program will give
>different results on a different computer system.
>
>However, a thread can voluntarily yield the CPU (without going to sleep or
>some other drastic means) by calling the yield() method. The yield() method
>gives other threads of the same priority a chance to run.
>If the currently running thread yields the CPU (i.e. allows another thread to
>execute by calling the yield()), then the scheduler implements a simple
>non-preemptive round-robin scheduling order.
>
>
>>
>>You might be able to sidestep the reentrancy problem fairly easily by
>>using synchronized methods to avoid overlapping Toolbox calls. I
>>haven't looked at the AWT classes yet so I don't know for sure.
>
>
>This seems to be the case. By indentifying "critical sections" with the
>keyword "synchronized", you make it possible for separate, concurrent
>threads to access the same data items (a.k.a. condition variables).
>
>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: MikeDacon@aol.com
>Date: Sat, 2 Dec 1995 16:47:50 -0500
>Subject: Multiple toolkits and peers
>
>Hi fellow Java coders and the Java team!
>
>I really like the AWT implementation method of
>toolkits and peers. Who ever made that decision
>deserves a pat on the back.
>
>Being that each component can invoke a
>getPeer() and getToolkit() method, I was surprised to
>not find a setPeer() and setToolkit() method.
>I think this is just an oversight in that currently
>there is only one toolkit per platform. However,
>with Borland, Netscape and Metrowerks moving from
>early adoption to seasoned Java hackers - I would not
>be suprised to see multiple toolkits popping up.
>Also, this could also be the beginning of another
>Java spinoff market - toolkit and peer creation.
>
>Lastly, a setPeer() function would allow a
>programmer to possibly choose from a
>variety of peers (i.e. a 3D button peer as
>compared to the normal "default" button
>peer). This of course would also
>require the setting of a default peer in the
>constructor of the Component.
>
>What do you think?
>
>Java team, is this in the works?
>
>Thanks for any feedback,
>
> - Mike Daconta
>
>------------------------------
>
>From: donpark@telewise.com (Don Park)
>Date: Sat, 2 Dec 1995 13:56:50 -0800 (PST)
>Subject: Re: setIconImage
>
>setIconImage code in JDK 1.0 B1 does not try to convert the image into icon.
>It seems like they used to in the old API but didn't work too well so pulled
>it for now. Current code just loads the question mark icon.
>
>Don
>
>>>Has anyone sucessfully used setIconImage() with the Beta under Win95/WinNT?
>>>Looking at code in the appletviewer, I've tried to do something similar.
>>>From within the Frame I'm doing:
>>>
>>> img = getImage(new URL(panel.getDocumentBase(), "icon.gif"));
>>> setIconImage(img);
>>>
>>>The getImage routine does the same thing as the appletviewer's getImage. The
>>>image retrieved is non-null, but doing the setIconImage results in no
>>>visible change. Is there a bug here? Or am I just not doing something right?
>>
>>I had the same problem. I verified that the images are ok, and would display
>>in other circumstances normally, but I could not get them to work as window
>>frame icons.
>>
>>Gary Aitken garya@village.org
>>-
>>This message was sent to the java-interest mailing list
>>Info: send 'help' to java-interest-request@java.sun.com
>>
>>
>
>
>------------------------------
>
>From: ra104@cosc.bsu.umd.edu (Chris Gokey)
>Date: Sat, 2 Dec 1995 17:39:22 -0500
>Subject: Count
>
>Hi,
>
>I typed in the counting program from the Programmer's Guide that will count
the # of
>characters typed into the standard input stream. I tried compiling it, but I
>came up with this error. Why doesn't this work? It doesn't seem to want to
>except----> throws java.io.IOException????
>
>Thanks in advance,
>Chris
>
>class Count {
> public static void main(String args[])
> throws java.io.IOException
> {
> int count=0;
>
> while (System.in.read() != -1)
> count++;
>
> System.out.println("Input has " + count + " chars.");
> }
>}
>
>Here's the error:
>cerdic9:ra104:159> javac Count.java
>Count.java:2: '{' expected.
> public static void main(String args[])
> ^
>1 error
>cerdic9:ra104:160>
>
>------------------------------
>
>From: edanuff@protagonist.com (Ed Anuff)
>Date: Sun, 3 Dec 1995 00:32:09 -0800
>Subject: Creating an AppletStub and AppletContext
>
>Has anyone tried creating simple classes to implement AppletStub and
>AppletContext for use in standalone java applications. I know that
>getImage() can be implemented using createImage(new
>sun.awt.image.URLImageSource(URL u)) but what about getAudioClip()?
>
>Ed
>
>
>Ed Anuff
>Protagonist Interactive
>edanuff@protagonist.com
>http://www.protagonist.com/
>
>
>
>------------------------------
>
>From: vitaly@diogen.asc.rssi.ru (Vitaly Promislov)
>Date: Sun, 3 Dec 95 19:33:25 ???
>Subject: CropImageFilter class
>
>Hello
>Could anybody point to successfull usage of CropImageFilter class
>in applet or siply advice how I can cut off some region of existing image
>the other way? I failed to do it with CropImageFilter.
>
> ___________________________________________________________________
>Vitaly Promislov
>Astro Space Center, Russia e-mail: vitaly@diogen.asc.rssi.ru
> fax: 095 333-23-78
> Phone: 333-23-12
>
>------------------------------
>
>From: dstrauss@panix.com (David Strauss)
>Date: Sun, 3 Dec 1995 12:08:26 -0500 (EST)
>Subject: Re: Thread Scheduling in Win32
>
>In article <49hgm2$625@romeo.logica.co.uk>, stupplem@logica.com says...
>>
>>In article <49hf85$cmi@news1.panix.com>, dstrauss@panix.com says...
>>>
>>>There's an applet called RaceTest that accompanies the section on
>>>thread priorities in the Java Progammer's Guide. It creates two
>>>"Runner" threads whose run method is a loop that counts up to
>>>400K. The runners do no I/O so they should not block. There is a
>>>higher priority thread that occasionally wakes up and reports the runers'
>>>progress.
>>>
>>>According to both the Java and Win32 documentation, thread scheduling
>>>is done only among those threads that are at the highest
>>>priority level of all currently runnable threads. Thus, if you
>>>set the runners to different priorities, the lower priority
>>>runner should be "starved out" until the higher one finishes.
>>>This is clearly not happening when I run the applet in Windows 95.
>>>Although the higher priority runner always wins by a large margin,
>>>the lower priority thread manages to butt in every once in awhile and
>>>bump its count a few ticks.
>>>
>>>This behavior is contrary to both the Java and the Win32 specs. Does
>>>anybody know what's going on? (I did discover that the 10 Java
>>>priorities are mapped to only 6 Win32 priorities and I am
>>>definitely assigning different Win32 priorities to the runners,
>>>so it has nothing to do with that.)
>>
>>Not sure about java scheduling, but as far as Win32 stuff goes I think you
>can
>>only ever set the base priority level of a thread - the dynamic priority
>>(which is actually the one used for scheduling) is assigned by the system
>>based upon several factors, including things like total CPU use and time
>since
>>last timeslice ...? ... or something like that.
>>This ould explain the bahaviour you see - the higher priority racer gets most
>>CPU, but as it does so it's dynamic priority is reduced and the dynamic
>>priority of the 'tortoise' thread is increased allowing it to occasionally
>get
>>a timeslice.
>>
>>Anyone else care to add to - or refute - any of the above?
>>
>>Matt.
>>--
>>Matt Stupple - stupplem@logica.com - http://www.logica.com/
>>Logica UK Ltd, 75 Hampstead Rd NW1 2PL, +44(0)1716379111
>>Words, thoughts and ideas all my own.
>>
>
>This certainly makes sense out of the behavior I'm seeing. If this
>is true then there is no way in Win32 to "starve" a lower priority
>process?? It seems that there should be.
>
>
>
>- --
>- ------------------------------------------------
>David Strauss
>E-mail: dstrauss@.panix.com
> dstrauss@lehman.com
>- -------------------------------------------------
>
>
>------------------------------
>
>End of java-interest-digest V1 #282
>***********************************
>
>
>
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com