[5785] in java-interest
java-interest-digest V1 #103
daemon@ATHENA.MIT.EDU (owner-java-interest-digest@java.su)
Mon Feb 26 18:27:16 1996
Date: Sat, 24 Feb 1996 14:49:49 -0800
From: owner-java-interest-digest@java.sun.com
To: java-interest-digest@java.sun.com
Reply-To: java-interest@java.sun.com
--------------------------------------------------------------------------
owner-java-interest-digest@java.sun.com is not allowed to post to the list.
Please contact root@econnection.com if you have any problems.
--------------------------------------------------------------------------
java-interest-digest Saturday, 24 February 1996 Volume 01 : Number 103
In this issue:
java-interest-digest V1 #95
bug with synchronization.
[none]
Fonts...
Repainting an applet ...
Re: Fonts...
Loading large image files
Re: Fonts...
what is the easiest...
Re: Fonts...
----------------------------------------------------------------------
From: astricek@gpu.com
Date: 22 Feb 96 0:28:14
Subject: java-interest-digest V1 #95
java-interest-digest Tuesday, 20 February 1996 Volume 01 : Number 095
In this issue:
redrawing and JPEG images
MenuBar
Bugs under Solaris 2.5
Re: Java Compiler
Using JAVA in C code.
Problems Displaying Frames on Solaris 2.3
IDE
doubts on new
Re: Internet Computers
Finalize Broken?
java IDEs?
multidim arrays
Re: Where to get jave executable
Interface as types
Destroying window
free Java newsletter
Re: Interface as types
Java and templates
C++ - how to link
Informix and Java
Re: Inter-applet Communication
Applet woes
Re: Protected Variables' "Caveat" - Misrepresented?
Re: Finalize Broken?
- ----------------------------------------------------------------------
From: kirk@giorgio.hart.bbk.ac.uk
Date: Tue, 20 Feb 1996 11:02:18 GMT
Subject: redrawing and JPEG images
Dear Javas,
I have found that displaying JPEG images with java (on Netscape2 at least)
always dithers the image - even if the display is 24 bit! Loading
the same image into Netscape without using Java creates a nice 24 bit
display - So is there some tweak necessary to get Java to recognise
24 bit adaptors?
I have also had terrible repaint() problems - for example when an
event handler shuffles some Images around - reads some for example,
then calls repaint() I don't necessarily get a complete repaint!
And yet damaging the display area with another window for example
does a proper repaint! (my paint() handler simply draws Images on screen!)
Any ideas?
Thanks - great discussions on here....
Kirk Martinez
Birkbeck College
History of Art Dept. University of London
- ------------------------------
From: lantres@damas.seriat.fr (Franck Lantres)
Date: Tue, 20 Feb 1996 14:52:10 GMT
Subject: MenuBar
I would like to underline a letter of a menu item. Under Windows 95, if I write
&File, the F is underline, but not under Solaris 2.5.
Another question about menu : what is the solution to put a menu at right like
the 'Help' menu ?
(NB: I use JDK 1.0 and my system is Solaris 2.5 under CDE.)
Thanks for help.
- - ---------------------------------------------------
Franck LANTRES
CERSIAT/BAE
Fort de Bicetre
BP 56
94272 Le Kremlin Bicetre Cedex
FRANCE
tel : (33 1) 45 15 37 59
fax : (33 1) 54 15 37 55
email : lantres@seriat.fr
- - ---------------------------------------------------
- ------------------------------
From: lantres@damas.seriat.fr (Franck Lantres)
Date: Tue, 20 Feb 1996 13:52:41 GMT
Subject: Bugs under Solaris 2.5
My system is running with Solaris 2.5 with Common Desktop Environment 1.0.1
and I use the JDK 1.0 of Java.
I have several problems : the applications, which made and worked under
Windows 95, doesn't work under Solaris 2.5. Here are the bugs under Solaris :
*) the WINDOW_xxx are not notify, even if I subclass my frame and check for
the WINDOW_xxx event in the handleEvent() method.
*) when the frame is created, its component (menubar, buttons ...) are not
painted (I use the pack(), resize() and show() methods).
*) Furthermore, when I resize the frame the background of the frame is not
updated. If x is the background, here is the result :
a) -------- b) ------------
|xxxxxx| |xxxxxx |
|xxxxxx| |xxxxxx | a) before resizing
|xxxxxx| |xxxxxx | b) after resizing
-------- | |
| |
------------
Is it a problem of configuration of Solaris ?
Thanks for help
- - ---------------------------------------------------
Franck LANTRES
CERSIAT/BAE
Fort de Bicetre
BP 56
94272 Le Kremlin Bicetre Cedex
FRANCE
tel : (33 1) 45 15 37 59
fax : (33 1) 54 15 37 55
email : lantres@seriat.fr
- - ---------------------------------------------------
- ------------------------------
From: Siju Nair <nair@BITS.soft.net>
Date: Tue, 20 Feb 1996 10:35:28 +0000 (GMT)
Subject: Re: Java Compiler
On Sun, 18 Feb 1996, Jean-Marc Giblaine wrote:
> Hi
>
> Does anybody know of editors working about a true JAVA compiler
> dedicated to the Intel/NT platform. I will be interested to use Java as
> a C++ substitute for developing on the server side.
>
> Thanks
>
> Jean Marc
Hai,
Check out Borland C++. It does support it. They have supplied a
debbuger in which we have awt.dll etc
Cheers:-)
Siju
>
>
> -
> 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
>
_______________________________________________________________________________
Official Address : Residence Address :
Distance Learning Programmes Division BF 1-C,New Bachealor Qtrs
Birla Institute of Technology & Science BITS,Pilani
Pilani, Rajasthan 333 031 Rajasthan 333 031
India India
Phone : 91-01596-42210
_______________________________________________________________________________
" Begin a Work to Finish it "
- - -----------------------------------------------------------------------
- --------
- ------------------------------
From: Terence C Haddock <haddock@UDel.Edu>
Date: Mon, 19 Feb 1996 17:41:35 -0500
Subject: Using JAVA in C code.
Does anybody have any source code/examples of using JAVA
in C code under Windows NT. Also, what is the legal implications
of using the Java interpreter?
- Terence C Haddock
haddock@udel.edu
- ------------------------------
From: bobs@wsi.com (Bob Schwartz)
Date: Tue, 20 Feb 1996 13:26:34 -0500
Subject: Problems Displaying Frames on Solaris 2.3
I'm writing an applet that utilizes a frame to do some collection
of data. Everything works fine when running on Windows 95 in both
Netscape and Appletviewer. When running the same applet on a Sparc
under Solaris 2.3, nothing happens in either Netscape or Appletviewer.
The one thing I notice that may be of some significance is that the
frame displayed under Windows 95 has "Untrusted Java Applet Window"
in the status bar of the window.
I'm totally perplexed, is this a known bug or am I doing something
really dumb.
Any insight would be appreciated.
Bob Schwartz
bobs@wsi.com
- ------------------------------
From: Iliana Meneses Hernandez DASU <iliana@tzetzal.dcaa.unam.mx>
Date: Tue, 20 Feb 1996 12:38:41 -0600 (CST)
Subject: IDE
>:)
Hi!!!!
I'm a new to this list, so this is likely to be a FAQ
What is the best free IDE for java, and where can I get it?
Thanks
__________________________________________________________________________
, ,
("\''/").___..--''"`-._
UNAM `9_ 9 ) `-. ( ).`-.__.`)
DCAA-IMAS (_Y_.)' ._ ) `._ `. ``-..-'
iliana@xel-ha.dcaa.unam.mx _..`--'_..-_/ /--'_.' .
iliana@tzetzal.dcaa.unam.mx (il).-'' ((i).' ((!.-'
__________________________________________________________________________
>
- ------------------------------
From: Siju Nair <nair@BITS.soft.net>
Date: Wed, 21 Feb 1996 00:37:15 +0000 (GMT)
Subject: doubts on new
Hai,
a = new("class" + "A")
The above statement does it return an object of type class A. The next
doubt is this statement calls the constructor with no arguments. if I
want to use the same above syntax to create new object such that I can
pass arguments to it how do I do it.
Awaiting an reply from any JAVA GURU's
Cheer:-)
Siju
_______________________________________________________________________________
Official Address : Residence Address :
Distance Learning Programmes Division BF 1-C,New Bachealor Qtrs
Birla Institute of Technology & Science BITS,Pilani
Pilani, Rajasthan 333 031 Rajasthan 333 031
India India
Phone : 91-01596-42210
_______________________________________________________________________________
" Begin a Work to Finish it "
- -
- -------------------------------------------------------------------------------
- ------------------------------
From: Mike Paluka <mikep@exmachina.com>
Date: Tue, 20 Feb 1996 11:17:41 -0800
Subject: Re: Internet Computers
At 10:30 AM 2/19/96 +0100, you wrote:
>I would like to throw in my couple of cents on how would I make an OS for a
>Java computer, I hope this is not considered too OT here.
>Saying that the OS is a browser is reductive in my opinion and would be too
>restrictive on the user.
...
You have some interesting ideas.
We object-oriented programmers can learn a lot from (the misfortunes of)
procedural programming. Classes need to be more granular in order to
separate the ad-hoc from the general, thus minimizing side-effects and
maximizing code re-use.
As far as operating systems go, applications need to be constructed of in-
dividual, replacable units; together with a common interface. The best
example of this is not found in OLE nor CORBA, but the Unix 'streams'
data communications subsystem. Streams (not to be confused with file
streams) allow different protocols to be dynamically linked together to
form a protocol 'stack'.
I think that this is what we need in operating systems and applications;
the ability to, for example, attach a graphics editor to a document that
we're currently working on; edit some graphics; then attach an SMTP
client and mail it; then attach a database object to store the document.
How Java fits into this picture is by providing the essential building-
blocks, such as class and method synchronization. Other languages/
environments support most of these, but Java provides a common interface
and behaviour for these low-level services.
Have you ever compared SEMAPHORES under Unix with
MUTEXes under Win32? As you get deeper into these services, it becomes
impossible to write code that is both portable and readable.
end
**************************
From : Michael J. Paluka
At : mikep@exmachina.com
- ------------------------------
From: TPrerovsky@aol.com
Date: Mon, 19 Feb 1996 22:22:56 -0500
Subject: Finalize Broken?
Hi Mike!
>> Is the finalize method in java.lang.Object operationable? I haven't
>> seen too much discussion of it, but it is still a valuable tool.
>> For example, with the following code:
>> public class tryer {
>> public void testme() {
>> System.out.println("Here we go...");
>> }
>> protected void finalize() {
>> System.out.println("Good bye!!!");
>> }
>> }
>> public class gb3 {
>> public static void main(String argv[]) {
>> System.out.println("1");
>> testing();
>> System.out.println("2");
>> testing();
>> System.out.println("3");
>> }
>> static void testing() {
>> tryer examp;
>> examp = new tryer();
>> examp.testme();
>> }
>> }
>>
>> Everytime the testing() method is run, a new tryer object is created.
>> Therefore, when the method is done, it should be collected - thereby
>> executing the finalize() method.
>> Thus, I would expect to get the following output:
>>C:\dev>c:\jdk2\java\bin\java gb3
>>1
>>Here we go...
>>Good Bye!!!
>>2
>>Here we go...
>>Good Bye!!!
>>3
>>However, I get:
>>C:\dev>c:\jdk2\java\bin\java gb3
>>1
>>Here we go...
>>2
>>Here we go...
>>3
The garbage-collectecr which removes unused objects, objects which aren't
referenced anymore, is a pure BACKGROUND-process! You cannot rely on an
implicit
call of the finalization-method by the garbage-collector at all. The only way
to
make sure that the finalize()-method will be called at the right time is an
explicit
call at the end of the object's lifetime:
static void testing() {
tryer examp;
examp = new tryer();
examp.testme();
examp.finalize(); //EXPLICT CALL
}
You have to know that the java-interpreter waits with garbage-collection
until there's not
enough memory (if there are a lot of processes which occupies the CPU) or if
he get some rare processing-time from the scheduler due of less
process-activity. So it's possible to get some output like this:
1
Here we go
2
Here we go
Good Bye!!! <-- garbage-collector gains control
Good Bye!!!
3
This example is only 'theoretical' much more realistic is that where wouldn't
be any
output at all.
The conclusion must be: If you depend on time-accurate finalization-calls you
have
to make explicit calls, there's no alternative technique!
I hope I could help You!
Tomas
- ------------------------------
From: dc <dc@symbolicsoft.com>
Date: Tue, 20 Feb 1996 11:45:03 -0800
Subject: java IDEs?
Maybe still a little early, but looking for some recommedations for a Java
dev environment:
Has anyone compared Roaster and the Symantec espresso thing?
How about the way the BorlandDebugger is shaping up?
Which one is worth the money? I don't have any system reliably working right
now....
tia
dc
___________________________________________________________________
/\ dave 'dc' collier
/_/\ Symbolic Software, Inc.
/_\_ \ dc@SymbolicSoft.com
/___/__\ tel (415) 546 1295
use your Head or lose your Mind! http://www.BurnCycle.com
- ------------------------------
From: dc <dc@symbolicsoft.com>
Date: Tue, 20 Feb 1996 11:45:01 -0800
Subject: multidim arrays
hi all -
Well, no pointers; ok - but how do multidimesional arrays work?
I'm trying the following:
Within my class declaration:
private cMapObject tiles[][] = new cMapObject[33][33];
Then later I use it vis;
tiles[tx][ty].identify();
Only I get a null pointer in the appletviewer.
I've tried various different things, and the only thing I can seem to get to
work is like:
tiles[ (x * row_len) + y ].blah();
- - - ie using a one dim array and working it out myself - which is not as clear.
Any help would be appreciated.
dc
___________________________________________________________________
/\ dave 'dc' collier
/_/\ Symbolic Software, Inc.
/_\_ \ dc@SymbolicSoft.com
/___/__\ tel (415) 546 1295
use your Head or lose your Mind! http://www.BurnCycle.com
- ------------------------------
From: Mike Paluka <mikep@exmachina.com>
Date: Tue, 20 Feb 1996 11:56:38 -0800
Subject: Re: Where to get jave executable
At 01:10 PM 2/19/96 GMT, you wrote:
>
>Where could i get a java API or program ?
>
>--Pascal
>
Some of several:
http://www.javasoft.com
http://java.sun.com
I don't mean to sound disparaging, but why didn't you just
seach the net yourself? Use any engine and search for
'java'.
You can find anything in the world by starting at:
http://home.netscape.com/home/internet-search.html
where they have almost every search engine you'd want.
Praise be to Netscape Communications Corp., they deserve
every success.
end
**************************
From : Michael J. Paluka
At : mikep@exmachina.com
- ------------------------------
From: Siju Nair <nair@BITS.soft.net>
Date: Wed, 21 Feb 1996 01:43:03 +0000 (GMT)
Subject: Interface as types
My doubt is that suppose two class A & B inplements interface C. Now if
we call create a object of interface C lets say c and call c.methodname, how
will it know which method to call that of A or B.
Cheers:-)
Siju
_______________________________________________________________________________
Official Address : Residence Address :
Distance Learning Programmes Division BF 1-C,New Bachealor Qtrs
Birla Institute of Technology & Science BITS,Pilani
Pilani, Rajasthan 333 031 Rajasthan 333 031
India India
Phone : 91-01596-42210
_______________________________________________________________________________
" Begin a Work to Finish it "
- - ----------------------------------------------
- ---------------------------------
- ------------------------------
From: "Chemouny Sebastien" <etip@world-net.sct.fr>
Date: Tue, 20 Feb 1996 21:19:54 +0000
Subject: Destroying window
Hi,
Can an applet destroy a window where it has been launched ?
I mean i open a HTML document with javascript, this document contains
an applet and i'll want that this applet close the window. Is it
possible ??
TIA
Seb
- ------------------------------
From: "Glen McCluskey" <glenm@glenmccl.com>
Date: Tue, 20 Feb 1996 10:09:32 +0000
Subject: free Java newsletter
I am starting a free technical Java language newsletter. It will
contain information on language features, present code examples, offer
performance tips, give examples of complete applets, compare Java with
C/C++, and so on. The newsletter will be independent of any particular
Java product or company.
The newsletter will typically be six pages in length and will be
issued at intervals of approximately three weeks. If you wish to
subscribe, send mail to majordomo@world.std.com with this line as the
message body:
subscribe java_letter
Glen McCluskey
glenm@glenmccl.com
- ------------------------------
From: Thomas.Ball@Eng.Sun.COM (Thomas Ball)
Date: Tue, 20 Feb 1996 13:04:11 -0800
Subject: Re: Interface as types
You can't "create an object of interface C" -- interfaces are specifications,
not implementations. The runtime test "instanceof" is overloaded: for
classes it means "is object an instance of the specified class"; for
interfaces it means "does the object's class implement the specified
interface".
Tom Ball
Java Products Group
> My doubt is that suppose two class A & B inplements interface C. Now if
> we call create a object of interface C lets say c and call c.methodname, how
> will it know which method to call that of A or B.
>
> Cheers:-)
> Siju
- ------------------------------
From: Mike Paluka <mikep@exmachina.com>
Date: Tue, 20 Feb 1996 13:31:22 -0800
Subject: Java and templates
What's the current thinking about C++ templates and
Java?
Has anybody tried Borland 5.0's java environment? Let
me know what you think of it.
end
**************************
From : Michael J. Paluka
At : mikep@exmachina.com
- ------------------------------
From: Dae Song Park - the jibe master <dpark@F1.telekurs.ch>
Date: Tue, 20 Feb 1996 15:51:31 -0500
Subject: C++ - how to link
Has anyone successfully linked C++ objects to Java? I haven't been
able link due to relocation errors. I'm simply wrapping C++ objects
with C functions with no success whatsoever. Any help will greatly
be appreciated.
The following is the error messages generated by the linker: (Note
that it links fine if cout is commented out.)
ld.so.1: /usr/local/java/bin/../bin/sparc/java: fatal: relocation
error: symbol not found: cout: referenced in .//libhello.so
(.//libhello.so)
java.lang.UnsatisfiedLinkError: no hello in shared library path
at java.lang.Runtime.loadLibrary(Runtime.java)
at java.lang.System.loadLibrary(System.java)
at HelloWorld.<clinit>(HelloWorld.java:7)
at Main.main(Main.java:6)
java.lang.UnsatisfiedLinkError: printHelloWorld
at Main.main(Main.java:12)
Thanks,
- - --
Dae Song Park
Telekurs (USA) Inc.
email: dpark@f1.telekurs.ch
work: (203)353-8100 fax: (203)967-2961
- ------------------------------
From: Brent Groom <groom@opennet.net>
Date: Tue, 20 Feb 1996 14:43:46 -0700 (MST)
Subject: Informix and Java
Is anyone working on connecting to an Informix database
from a Java applet. I'm also interested in connecting to
a MG database.
TIA,
Brent
- - ------------------------------------------------
Brent Groom groom@opennet.net
- - ------------------------------------------------
- ------------------------------
From: "guy.elliott" <guy.elliott@ac.com>
Date: 15 Feb 96 9:59:24
Subject: Re: Inter-applet Communication
In addition to this I am interested to know if anyone knows if applets can
communicate across frames. Are applets in different frames considered to be in
the same AppletContext, I know this would be pretty easy to test, and I will
sometime soon. I just wanted to know if anyone had tried already and could
save me some work.
TIA,
Guy
___________________________________________________________________________________________________________________________________________________________________________________________________________________
To: jkap @ jade.org @ internet, java-interest @ java.eng.sun.com @ internet
cc: (bcc: Guy Elliott)
From: Bruno.Souza @ Brazil.Sun.COM (Bruno Souza - Sun do Brasil) @ internet
Date: 02/12/96 07:42 AM
Subject: Re: Inter-applet Communication
___________________________________________________________________________________________________________________________________________________________________________________________________________________
>
> Can anyone provide (or point me toward) any information about inter-applet
communication, specifically in a multi-page environment?
>
Lot's of people has been asking this, so let me try to sumarize what
I've learned in the last weeks. (Someone that knows better, *please*
correct any mistake!!! :-)
Applets can comunicate with each other through method calling if the
applets have been loaded in the same page. I had no success so far to
make applets from different pages to comunicate (I haven't tried too
much either, since I believe it's not possible :-)
The usual way to applet1 call a method of applet2 is to applet1 grab a
handle to applet2 with AppletContext.getApplet(), do a cast to applet2
and then call it's method:
Applet2 ap2 = (Applet2) getAppletContext().getApplet("Name_in_HTML_tag");
where "Name_in_HTML_tag" is the argument in the "name" tag on the
applet2 call ont the HTML file.
This should work, and it acctually does under appletviewer (I've tryed
both the Solaris & Windows95 version) but it *does not* work under
netscape (I've tried versions b5, b6 and final). It seems that netscape
can do AppletContext.getApplets(), but not AppletContext.getApplet().
So, the workaround that <jmarin@superlink.com> send me (and it works
beutiffuly Marin, thanks!) is to make an enumeration with
AppletContext.getApplets(), and then look for the applet that you
want:
// get the applet context
m_ac = getAppletContext();
// get all applets in m_ac
Enumeration en = m_ac.getApplets();
for (; en.hasMoreElements() ;)
{
Object o = en.nextElement();
String name = o.getClass().getName();
// if it is the applet I'm looking for
if(name.equals("Applet2"))
{
// make a cast
(Applet2) o;
}
}
// if I got the reference to the applet
if (o != null)
{
// call the method
o.Applet2_Method(Method_Arguments);
}
With this you don't need to use the "name" parameter in the applet tag,
because the name that you get from AppletContext.getApplets() is the
name of the class.
Hope this is not too much confusing :-) If someone does know how to
make applets that were loaded in diferent pages to comunicate in any
way (besides going back to the server to get their common info), I
would like to hear!!
Bruno.
___________________________________________________________
Bruno Peres Ferreira de Souza Sun Microsystems
Bruno.Souza@Brazil.Sun.COM
> Thanks,
> -Jonathan
>
>
- -
- --------------------------------------------------------------------------------
> Jonathan Kaplan
> jade.org:The Java(tm) Developers Organization
> 500 Bloomfield Ave
> Verona, NJ 07044 (201) 239-7500 x264
> http://www.jade.org
- - -
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
- - -
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com
- ------------------------------
From: rharriso@elmer.tcinc.com (Raymond Harrison - TCI/AIT)
Date: Tue, 20 Feb 1996 15:05:17 -0700 (MST)
Subject: Applet woes
Howdie All -
I have written a Sybase Client in AWT that
communicates with a Java SYBASE Server handling basic
queries and returning the results to display in the
Client list box. It is (or will be) a port of
Tom Poindexter's WISQL program. It works great
as a stand-alone application and it also works
if you call it through Netscape. However, if you try
to use it WITHIN netscape, the DataInputStream of the
server receives a null string. I know that either
applets/or netscape have certain restrictions concerning
socket communications. Just one question: Is this what
I am running into or is it something else?
SNIPPET OF CODE USED:
SERVER: try
{
if (socket == null) {
socket = new ServerSocket(port_number, count);
}
}
catch(IOException e)
{
System.out.println("Can not open socket");
System.exit(0);
}
System.out.println("Waiting for client connection.");
if (connection == null) {
connection = socket.accept();
System.out.println("Connection made");
System.out.println("Connection = "+connection);
din = new DataInputStream(
new BufferedInputStream(connection.getInputStream()));
dout = new DataOutputStream(
new BufferedOutputStream(connection.getOutputStream()));
System.out.println("DIN IS "+din);
}
System.out.println("Waiting for data.");
try {
//
//
//
//
//THIS IS NULL WHEN RECEIVED FROM THE CLIENT
//
//
//
//
qry = new String(din.readUTF());
} catch (java.io.IOException ioe) {
System.out.println("ERROR IS "+ioe.getMessage());
ioe.printStackTrace();
}
CLIENT
public class Client extends java.applet.Applet
{
static int I=0;
public static int count;
public static int col;
boolean die = false;
public static String[] message;
public static DataInputStream din;
public static DataOutputStream dout;
..
..
..
..
try
{
socket = new Socket(host, port_number);
}
catch(IOException e)
{
System.out.println("Can not open socket");
System.exit(0);
}
din = new DataInputStream(
new BufferedInputStream(socket.getInputStream()));
dout = new DataOutputStream(
new BufferedOutputStream(socket.getOutputStream()));
System.out.println("OUTPUT STREAM IS "+dout);
..
..
..
..
qry = new String(qa.getText());
System.out.println("Text is "+qry);
qry.trim();
dout.writeUTF(qry);
dout.flush();
ANY IDEAS? ANYONE?
Thanks -
Ray Harrison
- ------------------------------
From: Jim.Graham@Eng.Sun.COM
Date: Tue, 20 Feb 1996 15:10:10 -0800
Subject: Re: Protected Variables' "Caveat" - Misrepresented?
> > If a class is both a subclass of and in the same package as
> >the class with the protected variable, then the class has access to
> >the protected variable (its package status takes precedence over its
subclass status).
>
> The first part says something that seems rather obvious. Both
> subclasses AND members of the same package have access to protected
> variables. Being both shouldn't limit the variables that a given
> class can access.
> What it in parenthesis thefore doesn't make sense for two reasons:
> 1. It is illogical as a result of what I said in the last paragraph.
> 2. It contradicts what we saw in the Gamma example.
I think the bottom line is that protected enhances the access of a
particular field or method to allow subclasses to access it with the
condition that they only be able to access those protected methods
and fields on objects which are subclasses of themself. The protected
keyword only expands access, it does not restrict other forms of access,
such as the public/(friendly)/private status. Thus, a method or variable
can be accessed if it has the appropriate scope status, or if it is
protected and a subclass's method is accessing it on an appropriately
classed object.
In other words, public/(friendly)/private are orthogonal to protected.
...jim
- ------------------------------
From: Jim.Graham@Eng.Sun.COM
Date: Tue, 20 Feb 1996 15:22:36 -0800
Subject: Re: Finalize Broken?
> Everytime the testing() method is run, a new tryer object is created.
> Therefore, when the method is done, it should be collected - thereby
> executing the finalize() method.
The finalize() method will be called the next time that Garbage Collection
is done. Unreferenced objects are not immediately collected. If you
put a call to "System.gc()" after each call to "testing()", then you
should see the finalizer getting called. If you put one call to System.gc()
at the end of the main() method, then you should see both finalizers called
together there...
...jim
- ------------------------------
End of java-interest-digest V1 #95
**********************************
------------------------------
From: Pradeep Badri <pbadri@cisco.com>
Date: Fri, 23 Feb 96 13:30:52 PST
Subject: bug with synchronization.
Hi,
HERE'S A BUG WITH VERIFICATION PROCESS.
When i run the program (see below) with the -verify option, it
gives me the following error.
java -verify Test
VERIFIER ERROR Test.doSomething([Ljava/lang/String;)V:
Expecting to find object on stack
Can't find class Test
But it runs fine without the verify optionn (java Test).
Since netscape does a verify and the program does not run under netscape.
Appreciate any help.
Regards,
- -pradeep.
Pradeep Badri.
Cisco Systems.
/***********Here's the program. **************/
import java.applet.* ;
public class Test extends Applet {
public Test() { super() ; } ;
public void init() {
String vlist[] = {"netscape", "need", "help" } ;
doSomething(vlist) ;
}
public void doSomething(String v[]) {
synchronized (v) {
System.err.println("Just do something") ;
}
}
public static void main(String ss[]) {
String vlist[] = {"aaa", "bbb", "ccc" } ;
Test t = new Test() ;
t.doSomething(vlist) ;
}
}
------------------------------
From: marcel.g@magnet.at (Marcel Grunauer)
Date: 24 Feb 1996 13:49:26 GMT
Subject: [none]
Please put on your mailing list. My name is Marcel Grunauer, the e-mail
address is marcel.g@magnet.at.
Thank you.
------------------------------
From: Dave DeMaagd <demaagd@cs.hope.edu>
Date: Sat, 24 Feb 1996 10:42:09 -0500
Subject: Fonts...
Who can tell me what fonts are in the java.awt.Font, and where I can get others...
Also looking for something like the PASCAL delay()...
I'm not quite dead, I think I'd like to go for a walk now...
Dave DeMaagd
demaagd@cs.hope.edu
http://www.cs.hope.edu/~demaagd
------------------------------
From: Katsalis Nikolaos 537 <katsalis@csd.uch.gr>
Date: Sat, 24 Feb 1996 19:38:00 +0200
Subject: Repainting an applet ...
Hi,
I am working with an applet that communicates using
sockets. In the time of communication I want to repaint the applet.
The applet has on it 3 panels each of which has a few components.
If something hapens during the communications (i.e another window
gets on netscape) the applet doesn't look nice, and I must wait
for the communication to end in order the applet to be repainted.
How can I force the repainting of the applet and all of it's
components when I want to ?
I tried to call repaint() of all applets and components but the
applet does not be repainted.
I also tried using: paintComponents(getGraphics());
but it is also not working.
Thanks in advance,
Nikos.
------------------------------
From: avh@netcom.com (Arthur A. van Hoff)
Date: Sat, 24 Feb 1996 10:29:30 -0800 (PST)
Subject: Re: Fonts...
Hi Dave,
> Who can tell me what fonts are in the java.awt.Font, and where I can get others...
You can get a list of available fonts by calling:
String fonts[] = getToolkit().getFontList();
There are a couple standard fonts. The intention was that you
can also access platform specific fonts, in that case you would
have to specify a property that maps the symbolic name to the
platform specific name. I don't think this is implemented
correctly though.
Have fun,
Arthur van Hoff
Suite 3, 345 California Ave, Palo Alto, CA 94306,
415-328 JAVA (work), 415-328 5283 (direct), avh@netcom.com
------------------------------
From: Jon Barber <jon@pavilion.co.uk>
Date: Wed, 24 Jan 1996 22:00:04 +0000
Subject: Loading large image files
Hi,
Sorry if this is blindingly obvious to you, but it isn't to me....
Is there a simple technique to ensure all images have been loded before
starting a loop for a simple animation ? I've been given 17 quite largish
gifs (about 2000 bytes each) to loop through, but the images aren't all
loaded before the loop starts. A simple but wrong solution would be to
wait, say, 3 seconds. There must be a better way ?
I've tried loading the images in both init and run, but neither works properly.
Jon.
------------------------------
From: Pat Niemeyer <pat@icon-stl.net>
Date: Sat, 24 Feb 1996 16:10:21 -0600 (CST)
Subject: Re: Fonts...
On Sat, 24 Feb 1996, Arthur A. van Hoff wrote:
> There are a couple standard fonts. The intention was that you
Can you tell us what the standard fonts are? ;)
There seem to be five:
Dialog
Helvetica
TimesRoman
Courier
Symbol
Can we assume that these (or some subset of these) will always be there?
(whatever they really map to)
Thanks,
Pat
------------------------------
From: demaagd@cs.hope.edu (David DeMaagd)
Date: Sat, 24 Feb 1996 17:44:12 -0500 (EST)
Subject: what is the easiest...
way to get rid of flicker, its driving me mad...
Dave
------------------------------
From: avh@netcom.com (Arthur A. van Hoff)
Date: Sat, 24 Feb 1996 14:48:59 -0800 (PST)
Subject: Re: Fonts...
Hi Pat,
> On Sat, 24 Feb 1996, Arthur A. van Hoff wrote:
>
> > There are a couple standard fonts. The intention was that you
>
> Can you tell us what the standard fonts are? ;)
>
> There seem to be five:
>
> Dialog
> Helvetica
> TimesRoman
> Courier
> Symbol
>
> Can we assume that these (or some subset of these) will always be there?
> (whatever they really map to)
>
That is the the actual list. They will be available on each
platform. If you use another font name it will be mapped to
one of these (I guess times). In your properties file you can
specify specific mappings. For definign the following property:
awt.font.lucida=Helvetica
will map "Lucida" to "Helvetica". It should also be possible to
map symbolic names like Lucida to actual native font names, but
I'm not sure if that is implemented in the AWT (I haven't tried).
Have fun,
Arthur van Hoff
Suite 3, 345 California Ave, Palo Alto, CA 94306,
415-328 JAVA (work), 415-328 5283 (direct), avh@netcom.com
------------------------------
End of java-interest-digest V1 #103
***********************************
-
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