★ wanayoo — archive 1999 http://developer.java.sun.com/developer/community/chat/JavaLive/1997/jl0107.htmlNouvelle recherche | Portail wanayoo
Java Technology Home Page
A-Z Index

Java Developer Connection(SM)
Chat

Downloads, APIs, Documentation
Java Developer Connection
Tutorials, Tech Articles, Training
Online Support
Community Discussion
News & Events from Everywhere
Products from Everywhere
How Java Technology is Used Worldwide
 
JavaLive Transcripts Index

Java Live
AWT Enhancements
January 07, 1997

Moderator (MDR): MDR-Nancy

Guest-Speaker (SPK): SPK-Jonni

MDR-Nancy: Welcome to the AWT Enhancements Forum. Jonni Kanerva will be our guest.

SPK-Jonni: Hello.

MDR-Nancy: Thanks for joining us. Can you tell us what you do here at JavaSoft.

SPK-Jonni: I'm a member of the AWT development team, and I'm also writing "The Java FAQ," to be published as part of "The Java Series."

MDR-Nancy: Let's start with our first question from uomini.

uomini: When will the second Beta for JDK 1.1 be out? The first one was too buggy to work with.

SPK-Jonni: We have another beta release in the pipeline with lots of bug fixes based on the feedback we've been receiving, as well as other work in progress. I don't know the actual date, though, for when this release will go on the Web.

MDR-Nancy: Here's a question about the old propagation model from spietrow.

spietrowicz: Any idea when we can expect the old propagation model to be rolled back into the AWT?

SPK-Jonni: There are no plans to go back to the old event propagation model. Instead of propagating events up the hieararchy automatically, we're looking at ways to make it easier to propagate event listeners DOWN the hierarchy, so that you can set up a container to catch all the events in it, if you still need to design it that way.

MDR-Nancy: Continue sending in those questions! Uomini has another question.

uomini: It appears that much of the file I/O stuff was rewritten in JDK 1.1. Can you explain the motivation for this? Were there major design problems that needed to be fixed?

SPK-Jonni: The main thing with the file I/O improvements was to enhance the support for true Unicode input/output and support for internationalization work. The old InputStream and OutputStream classes (well, not that old yet :-) made strong assumptions about bytes versus characters. The new Reader and Writer classes are designed from the ground up to deal with Unicode, and with different encodings between byte streams and Unicode characters.

MDR-Nancy: While we wait for more questions to come in, Jonni would like to ask you all some questions.

SPK-Jonni: Yeah, my main question is what kind of experience you've been having with writing code to the new 1.1 API's—which new classes, methods are most useful, which are most clear (or unclear), etc.

MDR-Nancy: Uomini has a comment to Jonni's previous answer about I/O classes.

uomini: OK, so it looks like internationalization was the main motivation.

SPK-Jonni: Yes, that's my understanding too.

MDR-Nancy: Here's a response to Jonni's question.

uomini: I've written a major application (22,000+ lines), and due to bugs in updateAWT I haven't been able to even begin porting to JDK 1.1. Also, I'm not sure there will be much benefit to going over to 1.1, at least until it's out of Beta.

SPK-Jonni: That's the kind of larger-scale development we're trying to enable with 1.1, so your feedback is important. I'd like to make sure to get those awtUpdate bugs from you—maybe just a sketch for now and then the details by email (jonni.kanerva@sun.com). As for benefit of going over to 1.1, I agree that it is best to wait until FCS before you really rely on the 1.1, but the beta gives you an early target.

MDR-Nancy: Uomini has a comment.

uomini: Actually, I filed the bug reports against updateAWT the first week 1.1 was out..

SPK-Jonni: Okay, I'll doublecheck for it. Parts of the updateAwt are easy to fix, such as adding extra methods to translate (from old names to new names), but other parts may be harder or impossible to fix (such as knowing which class a method belongs to). It's a quick sed script that hopefully makes the porting job easier ...

MDR-Nancy: Here's one from spietrow.

spietrowicz: I like the ScrollPane a lot. :-)

We relied on the old propogation model to propogate events up the widget heirarchy to be automatically taken care of by a special object that allowed us to share those events across the network. We're anxious to see how the new method you spoke about just now will work. (We have a very large framework and many applications to go with it... a lot of code).

SPK-Jonni: I like ScrollPane too—without it, life was a scroll pain in the neck :-) What I was alluding to about propagating listeners down the hierarchy was a class that can be used to attach listeners recursively to a container and its descendants. It also implements ContainerListener, so that it can automatically detect when new children are added, or old children are removed. I wrote it as sample code for "The Java FAQ." I'd like to test it some more before making it available.

MDR-Nancy: spietrow has a comment.

spietrowicz: Yeah, we wrote one here, and it was a pain. Glad to see one in the standard release!

SPK-Jonni: Let me clarify: what I wrote so far is for sample code in the book; I can't say whether some version will appear as part of the standard release. What I wrote didn't seem too painful—I was using it to attach MouseListeners, rather than any general listener type. Were you trying to solve the completely generalj problem?

MDR-Nancy: Here's a question from drkuykendall.

drkuykendall: I use Java Workshop, how will this effect my classes?

SPK-Jonni: Hi—could you clarify that question? Are you asking about the availability of 1.1 AWT features in Java Workshop?

MDR-Nancy: Charles has a question about bug fixes.

charles: In brief, can you give a summary of some of the main bug fixes in 1.1? I am most interested in modal dialogs, window location information, and the choice component.

SPK-Jonni: I know there's been work on bugs in all these areas, but I can't think of a quick summary answer for you. For instance, in Choice, we filled in some obvious functionality gaps (such as removing items from a choice). Modal dialogs have been an ongoing pleasure :-), err, target for improvement. There is also a new API for querying the location of a component in absolute window coordinates.

MDR-Nancy: drkuykendall has made some clarification to his original question.

drkuykendall: 1. The features added to JWS. And how will you define the listeners; if you know at this time. 2. My, soon to be, old code converted...

SPK-Jonni: I don't know specifically when the new 1.1 features will show up in JWS. Like products from all our licensees, JWS has a certain number of months after we ship 1.1 FCS before they have to include the features. Of course, they are likely to want to include them as soon as possible.

MDR-Nancy: Here's a question from charles about compatible behavior.

charles: What has been done to ensure compatible behavior in the AWT between platforms?

SPK-Jonni: This is a really important target for the AWT team, and for JavaSoft in general. We're tightening up our specifications of what behavior we expect from AWT components, we're conducting some in-house compatibility testing, and we're getting good, useful feedback from the early users of the beta releases. Compatibility is REALLY important to the write once, run anywhere story, and it's definitely a trickier issue in a complex area like the AWT.

MDR-Nancy: mhgreen has a question about internalization.

mhgreen: My question pertains to internationalization.

I have kept all user interface text segregated in a single class, GUIControls, in anticipation of use of internationalization, and translating my app into other languages.

But, for internal tree structures I use "Root" and "Leaf" as node Parent and Child attributes. Will this cause me problems when the GUI is showing a language other than English?

SPK-Jonni: It's great that you're designing up front with internationalization in mind—I'm afraid I don't understand your specific question regarding parent and child attributes. Are these attributes a visible part of your interfaces—shown as labels or something?

MDR-Nancy: Here are comments from mhgreen.

mhgreen: Thanks. It's been this nagging little tweak in my conscience about whether I've needed to abstract out these literals. Guess I'm just a Unicode newbie.

mhgreen: The literals are internal only.

SPK-Jonni: If it's internal only, it sounds like you should be fine. The really egregious problems for internationalization are cases like coding event handlers that make explicit string comparisons to hard-coded button labels, etc. The new event model will, hopefully, encourage people away from stuff like that.

MDR-Nancy: Last call for questions. We have time for a few more. Uomini has a question.

uomini: What about performance in JDK 1.1? Will the JIT be incorporated in the release? Re the JIT, when will the next Beta release of it be out?

SPK-Jonni: I haven't kept up with the JIT issue specifically, so I don't know its release plans or status. Performance in general, though, has been improved by such means as tweaking the assembler code in the main Java interpreter loop, and by the Win32 rewrite of the AWT. The Win32 rewrite has resulted in significantly less code, which by itself can be a speed boon.

MDR-Nancy: Here's another question from uomini.

uomini: One last question: is there a more efficient way of cloning a List than just copying the items via a for loop?

SPK-Jonni: I guess you've already checked and found that List doesn't implement Cloneable? If it doesn't, then what you mention—copying items in a loop is the best you can do currently. In general, the JDK has been conservative about which classes are made Cloneable, and the ones that are made Cloneable tend to happen on a case by case basis. Would you like to make a strong case for making List Cloneable? At this late stage before releasing 1.1, API changes, even small ones, are being scrutinized VERY, VERY, VERY carefully.

MDR-Nancy: Uomini has a comment.

uomini: Yes! My app, a newsreader, often deals with a large number of newsgroups (20,000 or more) in a List. Cloning the list is very slow.

SPK-Jonni: with the team members as well.

MDR-Nancy: Our last question comes from spietrow.

spietrowicz: When is your book coming out?

SPK-Jonni: I'm in the final struggle with manuscript content right now, and production should be starting soon. With luck, it could even be out by April, in time for JavaOne!

MDR-Nancy: Any final comments, Jonni?

SPK-Jonni: Yes—keep using the AWT and keep sending us comments. Since we put up our design documents on the Web and opened up the java-awt@java.sun.com mail alias, we've received invaluable feedback from lots and lots of AWT developers. We read every message that comes in and try to respond as much as time permits. Your comments help us not just do things right, but they help us do the right thing. Happy coding!

MDR-Nancy: Thanks again for joining us Jonni. Happy New Year to all of you! Last moderator (me) signing off. The forum is now unmoderated

spietrowicz: Thanks for answering all those questions, Jonni!


[ This page was updated: 12-Jan-2000 ]
Products & APIs | Developer Connection | Docs & Training | Online Support
Community Discussion | Industry News | Solutions Marketplace | Case Studies
Glossary - Applets - Tutorial - Employment - Business & Licensing - Java Store - Java in the Real World
FAQ | Feedback | Map | A-Z Index
For more information on Java technology
and other software from Sun Microsystems, call:
(800) 786-7638
Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first.
Sun Microsystems, Inc.
Copyright © 1995-2000 Sun Microsystems, Inc.
All Rights Reserved. Terms of Use. Privacy Policy.