[5263] in java-interest

home help back first fref pref prev next nref lref last post

java-interest-digest V1 #71

daemon@ATHENA.MIT.EDU (owner-java-interest-digest@java.su)
Sun Feb 4 16:03:35 1996

From: owner-java-interest-digest@java.sun.com
Date: Fri, 2 Feb 1996 12:34:14 -0800
To: java-interest-digest@java.sun.com
Reply-To: java-interest@java.sun.com


java-interest-digest      Friday, 2 February 1996      Volume 01 : Number 071

In this issue:

       Reading Java HTML Docs
       Re: YACC & LEX
       Telnet*.class description?
       Re: FileDialog bugs!
       Anybody from Brazil????
       Re: GridBagLayout, and other layout problems.
       (no subject)
       [none]
       Is 'new' really necessary?
       java-linux: __libc_malloc error?
       writing to files
       RE: AWT differences between platforms
       Stop and Restart Java threading from C subroutine?
       Re: Image rotation
       Re: How is Window work in Java?
       Re: Why IBM ports WIN31?
       PICT, JPEG, etc. (was Re: Images)
       [none]
       java.awt.ps
       mouse troubles
       couple of easy questions
       [none]
       Re: Why IBM ports WIN31?
       Ports to other Unix OS?
       [none]
       Re: Is 'new' really necessary?
       Re: Is 'new' really necessary?

----------------------------------------------------------------------

From: dbailey7@ix.netcom.com (David Bailey )
Date: Thu, 1 Feb 1996 07:02:57 -0800
Subject: Reading Java HTML Docs

I'm a fledgling Java interested.  I downloaded the 1.0 JDK to my 
system.  I also downloaded both the postscript and the HTML flavors of 
the documentation.  (I learned that I had two flavors only after I had 
downloaded them (both sets had .zip extensions)).  Anyhow, can anyone 
kindly inform me what I can use to view the HTML documention?  As I 
said, I'm starting at the very beginning.  Thanks

------------------------------

From: niftyserve.or.jp!NBC02365@fujitsuI.fujitsu.com
Date: Fri, 2 Feb 96 08:58:33 JST
Subject: Re: YACC & LEX

Hee-Hwan said:
>I am just wondering that is there any company who is planning to
>develop YACC and LEX for java? I believe the powerful YACC and LEX for
>java should be available to java users. Please let me know any of
>company you know.

  I hacked berkley yacc to produce java and I build a calculator from
String. It is not so difficult. Try to do it yourself.

Best Regards.
NBC02365@niftyserve.or.jp
See http://www.webcity.co.jp/info/andoh/java/j2c.html








------------------------------

From: thomas@ergon.CH (Thomas Ward)
Date: Thu, 1 Feb 1996 15:40:17 +0100
Subject: Telnet*.class description?

Hello!

Does anybody know where there is a description of the 
java/classes/sun/net/Telnet*.class files or where the
source code could be found? Thanks in advance.

- -Thomas 

------------------------------

From: MSEMSEL@panix.com (Mark Semsel)
Date: Fri, 02 Feb 1996 05:17:03 GMT
Subject: Re: FileDialog bugs!

Your code is Ok.
I believe these are legitimate JDK beta 2 bugs.  If you upgrade to the
official JDK release 1.0, you should have fewer problems.

Mark Semsel
msemsel@panix.com


On Wed, 31 Jan 96 14:03:52 -0800, you wrote:

>I have run in to two very frustrating problems using object FileDialog in 
>JDK beta2 on Win95 :

>public class MyWin extends Frame {
>  ...
>  public boolean handleEvent(Event evt) {
>    ...
>    // File|Open menu item is selected
>    FileDialog fd = new FileDialog(this, "Open File");
>    fd.open();
>    String filename = fd.getFile();
>    if (filename != null)
>      System.out.println(fd.getFile());
>    ...
>  }
>}

>1) In an application or applet the parent window (MyWin in the above 
>example) of the FileDialog does not get refreshed when the FileDialog is 
>moved or closed.  An image of the FileDialog remains on the canvas, and 
>as an added bonus, the controls on the canvas stop functioning.  This 
>error can also be seen by viewing:
>   http://java.sun.com/tutorial/ui/overview/components.html
>and clicking the big button.

>2) The FileDialog does not return the file the user selected. 
>fd.getFile() returns <null> when called after the window closes (see code 
>snippet sabove).

>-- 
>Glenn E Twiggs
>getsmart@bga.com



>-
>This message was sent to the java-interest mailing list
>Info: send 'help' to java-interest-request@java.sun.com



------------------------------

From: Bruno.Souza@Brazil.Sun.COM (Bruno Souza - Sun do Brasil)
Date: Thu, 1 Feb 1996 14:29:58 -0200
Subject: Anybody from Brazil????

Hi All,

We, from Sun Microsystems do Brasil, are looking for
people that are currently developping Java aplicattions and/or
applets here in Brazil.

This is for an article about Java in a Brazilian computer magazine,
and they're looking for people that are doing Java commercially.

So, if you're in Brazil, send us a note. If you are working with
Java for commercial purposes, you might get your name in the press.
But even if your're for non-commercial use, we want to know
who you are, and what you've been doing, so we can contact you 
for future events.

If you write me, I can give you more info about that!

Thanks.

Bruno.
- --------------------------------------------------------
      /\       
     \\ \      
    \ \\ /     Bruno Peres Ferreira de Souza
   / \/ / /    Pre-Sales Support
  / /   \//\   Sun Microsystems do Brasil Ltda.
  \//\   / /   Sun Microsystems Computer Company 
   / / /\ /    E-mail: Bruno.Souza@Brazil.Sun.Com 
    / \\ \             bruno@IME.USP.BR
     \ \\       
      \/       
- --------------------------------------------------------

 

------------------------------

From: Mete Senocak <msenocak@arachnid.microweb.com>
Date: Fri, 02 Feb 1996 00:21:12 -0800
Subject: Re: GridBagLayout, and other layout problems.

Hi James:

James Waldrop wrote:
> 
> Ok, I can't wait for a decent Layout manager tutorial.  I'm trying to
> use GridBagLayout, and having quite a few problems.
> 
> The general thing I want to see is:
>  _______________________________
> |                               |
> |              A                |
> |_______________________________|
>  _______________________________
> |                               |
> |              B                |
> |_______________________________|
>  _______________________________
> |______________C________________|
> 
> Where:
> 
> A: is a subclass of Panel which contains a subclass of Canvas that an
>    image is drawn onto.
> 
> B: is a Panel which contains a TextArea.
> 
> C: is a Panel which contains a TextField.
> 
> Here's my code so far, please note the comments:
> 
>     public void init() {
> 
>         GridBagLayout gridBag = new GridBagLayout();
>         GridBagConstraints c = new GridBagConstraints();
>         c.fill = GridBagConstraints.BOTH;
> 
> //      setLayout(new FlowLayout());      // default, doesn't show A ??
> //      setLayout(gridBag);               // I can't make it show component A
> //      setLayout(new BorderLayout());    // Also doesn't show component A
>         setLayout(new GridLayout(3, 0));  // This works, but isn't what I want
>                                           // C is much too large...
>

Here is one problem: You have to create a panel object first and then call its 
method setLayout(), like this:

Panel  yourPanel;
yourPanel = new Panel();
yourPanel.setLayout(new GridLayout());

I didn't check the rest of the code thoroughly, it might work though after fixing 
this problem. 

Let me know if it works.

Good luck,

- -Mete

------------------------------

From: Jeff Marin <jmarin@mars.superlink.net>
Date: Thu, 01 Feb 1996 00:13:10 -0500
Subject: (no subject)

To all,

Found a very informative Web page with many current and future Java 
books.

http://lightyear.ncsa.uiuc.edu/~srp/java/javabooks.html

Check it out!
- -- 
************************************************************************Jeff Marin                        		http://www.worktechs.com
@Work Technologies

< put something profound here and most people will ignore it >

------------------------------

From: "RKNG.US.ORACLE.COM" <RKNG@us.oracle.com>
Date: 02 Feb 96 00:30:36 -0800
Subject: [none]

					 
Regards, 
Ray 
============================================================================ 
Raymond K. Ng	         | Oracle Corporation  | Phone: 415.506.2687	   | 
Technical Staff	         | 500 Oracle Parkway  | Fax:   
415.413.3045	   | 
Interactive Media Server | M/S 659505          | Email: rkng@us.oracle.com | 
============================================================================ 
 URL: 	(inside Oracle) 	http://rkng-sun.us.oracle.com/ 
 	(outside Oracle) 	http://www-leland.stanford.edu/~raymond/ 
============================================================================ 
     "You will never get ahead of anyone as long as you 
     try to get even with them." 
============================================================================ 

------------------------------

From: kkobashi@ix6.ix.netcom.com
Date: Fri, 2 Feb 1996 00:53:06 -0800
Subject: Is 'new' really necessary?

Can someone tell me why the 'new' keyword was used in Java?
It appears to me that its only use is as a token to
denote that a class instanciation is coming up next.
It seems redundant in that regard.

Given:
   (a) Date d = new Date(CurrentTime);      // Java compiler likes
   (b) Date d(CurrentTime);                 // Java compiler doesn't like
   (c) Date d;                              // Java compiler likes

Statement (a) uses the 'new' keyword. The disadvantage
is that it messes up C++ programmers to thinking that a dynamic
variable is being created (yes, Java doesn't have pointers but some
habits are hard to break). In addition, one has to type the class
symbol again, and the equal character.

Statement (b) is far more terse and natural for C++ programmers.

Statement (c) needs to be put in contrast to the following:
   Date d = new Date();

I hope you see my point. An instanciation is an instanciation.
Why must I think about a "new" object?

Kerry Kobashi
Kobashi Computing



------------------------------

From: Doc Do Minh <docminh@yallara.cs.rmit.EDU.AU>
Date: Fri, 2 Feb 1996 20:52:29 +1100 (EST)
Subject: java-linux: __libc_malloc error?

Hi,

My Java on Linux has got problem. I've got full ELF libs, but when I run java, I get this msg : 'can't resolve symbol __libc_malloc'

Does anybody know the reason of this error message?

I half-suspect that my original Linux kernel is a.out, which is later on upgraded to ELF. This might cause some incompatibility ? 

Thanks.

Duc Do Minh
- --

------------------------------

From: Darren Roberts - CM53-4 <derober0@pine.shu.ac.uk>
Date: Thu, 1 Feb 1996 11:21:26 GMT
Subject: writing to files

Hello,

I am still learning the basic of java and I have just written
an applet which takes a file name, opens a file with this name
and writes some text to the file.  This is however done using the
appletviewer, so can anybody tell whether this will work over the
network rather than locally, or could you point in the direction
of good documentation on the subject.

Thanx in advance

Darren

------------------------------

From: Avner Aviad <aaviad@netvision.net.il>
Date: Fri, 2 Feb 1996 12:17:43 +-200
Subject: RE: AWT differences between platforms

Mike wrote:

> For the first time I tried to bring up an app I usually run
> on Solaris under WinNT.  The result was an exception:

>    "AWT-Callback-Win32" java.lang.InternalError
>    getGraphics implemented only for Canvas components

> I do indeed do getGraphics on non-component stuff, namely images.
> Am I not supposed to do this, and the Solaris implementation just
> lets me get away with it, or is it a bug in the WinNT version, or
> is this something that will be there eventually?

> While I'm at it...is anyone aware of other differences between
> platforms?

>     -Mike

> P.S. I'm running the "production" version 1 on both platforms.


The difference you are reporting is actually a difference between the =
Beta version and the "shipping" SDK 1.0.=20

I have no idea if this is intended or a bug but note that this exception =
will happen even if you do not call getGraphics() directly but by way of =
calling repaint() on (say) a TextField force the ScreenUpdater to send =
an update(Graphics g) to this Component which in turn requires a =
getGraphics() call.

This is one of the unfortunate design errors that AWT seem to have. =
There is a complete imbalance in the implementation of native =
components. The programmer that attempts to subclass any of the non =
Canvas components will find out that the Win32 implementation will paint =
it's own controls without calling back into the Java code. This will =
prevent any special effects or changes to the painting of these =
controls.

Note that the same observation can be made to the handling of mouse =
events. One would have expected the AWT to consult a derived object =
mouse handling "override" before doing their own thing, but instead the =
AWT native object will handle most mouse events without any notification =
to the derived class.

Example:=20

One would like to have:

class MyField extends TextField {
...

	public void paint(Graphics g) {
		super.paint(g);
		doMyOwnPainting(g);
	}

	public boolean mouseDown(Event e, int x, iny y) {
		if(doMyOwnThing)
			{
			handleMyOwnMouseDown(x, y);
			return true;
			}
		else
			return super.mouseDown(e, x, y);
	}
}

now, if this was a Canvas all of this works. In my opinion this is a =
very odd and unacceptable way to implement AWT.

Hope you got it.=20

What do you think ???

- --------------------------------------------------
 Avner Aviad - Webra Software                             =20
 EMail: aaviad@netvision.net.il
 Web: http://www.netvision.net.il/php/aaviad
- --------------------------------------------------=20



------------------------------

From: danisch@ira.uka.de (Hadmut Danisch)
Date: Fri, 2 Feb 1996 12:54:59 +0100
Subject: Stop and Restart Java threading from C subroutine?

I have a dynamically loaded library written in C which is called from 
Java. The C library is not written reentrant and gets into trouble if
a procedure is interrupted and called by another thread.

What is the best way to stop and restart the threading from C ?

Thanks
Hadmut

------------------------------

From: Arthur.Vanhoff@Eng.Sun.COM (Arthur van Hoff)
Date: Tue, 30 Jan 1996 17:35:48 -0800
Subject: Re: Image rotation

Hi Chris,

> I have some images that I want to rotate by 90 degrees. 
> Can anyone give me some guidence or examples?

There really isn't a way to rotate images using the AWT.
However, I wrote a little applet that uses copyArea recursively
to rotate an image by 90 degrees. Check it out:

	http://java.sun.com/people/avh/rotate/

Have fun,

	Arthur van Hoff
	

------------------------------

From: dyerr@gdls.com
Date: Fri, 02 Feb 96 10:36:11 EST
Subject: Re: How is Window work in Java?

     I'm pretty sure you need a "setMenuBar(MainMenu);"
     
     I'm not sure though... I'm new as well.
     
     -Robby J

______________________________ Reply Separator _________________________________
Subject: How is Window work in Java?
Author:  Kok Kai Loon <klkok@csam.com.MY> at Internet/Unix
Date:    2/2/96 10:10 AM


Received: by ccmail from gdls.com
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post