Re: Problem with AWT and swing

1998-06-09 Thread gaolei

Dear Kumar,

I remember that long time ago, I also met the problem, and now I could
not remember how I fixed this problem very clearly. Maybe I just change
some add(xxx) to getContentPane().add(xxx).

But I think that the reason of your problem is you add the canvas on the
upper layer of the JMenu. You know, the add(xxx) method of a container
in swing delegate different container within a SWING CONTAINER. If you
like you could step into the swing's source code to see which container
excute the actural add(xxx), every and even more than enough swing
source code at your hand.

I think you should follow the way that getContentPane().add();
way.

For the container's archietechture, please read the doc on swing
connection.

Please continue your asking if my advice won't work.

Gao Lei


Chetan Kumar wrote:
> 
> Hello, it is same old problem, I am sorry if it is repeated. I tried this.
> 
> 1) Create a pulldown menu, JMenu.
> 2) Create a canvas, I did not find swing component for canvas, if there is
> please letme know.
> 3) Add canvas to JPanel,
> 4) Add JPanel and JMenu to Jframe.
> 
> Now the problem is that when I activate the menu, the pulldown menu come
> behind the canvas. i.e some item of the menu are hidden behind the canvas.
> 
> Any help ??
> 
> with thanks
> -Chetan

begin:  vcard
fn: Gao Lei
n:  Lei;Gao
org:StarGlobe
adr:International Business Park;;#09-02, The Synergy;Singapore;Singaproe;609917;Singapore
email;internet: [EMAIL PROTECTED]
title:  Software Engineer
tel;work:   (0065)6656961
tel;fax:(0065)6657912
tel;home:   (0065)96937680
x-mozilla-cpt:  ;-29328
x-mozilla-html: FALSE
version:2.1
end:vcard




Re: Problem with AWT and swing

1998-06-09 Thread Rani Pinchuk

Hello.

Since the Canvas is heavyweight component (AWT component) it comes above 
the light components (Swing components) like your pulldown menu.
 
In my opinion the main difference between Canvas and Panel is that Panel 
extends Container while Canvas doesn't. 
In Swing, however, JComponent extends Container - as written in the "Swing 
Short Course, Part I":   
"All JComponents are subclasses of java.awt.Container. This allows Swing 
widgets, such as JLabel, to contain other components (either AWT or Swing). 
This make for some interesting possibilities." 

What I would do in your case is to use JPanel instead of Canvas.

I hope this will help.

Rani

On Tue, Jun 09, 1998 at 11:45:59AM +0530, Chetan Kumar wrote:
> 
> Hello, it is same old problem, I am sorry if it is repeated. I tried this.
> 
> 1) Create a pulldown menu, JMenu.
> 2) Create a canvas, I did not find swing component for canvas, if there is
> please letme know.
> 3) Add canvas to JPanel,
> 4) Add JPanel and JMenu to Jframe.
> 
> Now the problem is that when I activate the menu, the pulldown menu come
> behind the canvas. i.e some item of the menu are hidden behind the canvas.
> 
> Any help ??
> 
> with thanks
> -Chetan 
> 
> 

-- 
--
Rani Pinchuk <[EMAIL PROTECTED]> Tel:  +32-3-326-79-97
http://www.kinetica.com/home/pinchuk
--




Re: java 1.2 ??

1998-06-09 Thread Azazel

According to the FAQ (http://www.place.org/~stevemw/java/FAQ/FAQ-java-linux.html):

> 2.5 When is the JDK 1.2 Going to be Released for Linux?
> 
> According to Steve Byrne on Monday, May 26th 1998: 
> 
>  JavaSoft is trying very hard to get a license set up with an external person
>  to coordinate the 1.2 Linux porting effort.  The plan is not to have to wait
>  until 1.2 ships, but to get things underway much sooner (1.2 is huge, and
>  involves lots more machine specific components, and will take a while to port).

HTH,

Az. >-)=




Re: RH5.0 and JDK1.1.?

1998-06-09 Thread Ulrich Kortenkamp

> "Azazel" == Azazel  <[EMAIL PROTECTED]> writes:

Azazel> Has anyone managed to get JDK1.1-complete preview version
Azazel> of 4.05 working under RH 5.0/5.1?  The Java was decidedly
Azazel> flaky, when I installed it.

I am running

 Netscape® Communicator 4.05
Preview Release 1 (AWT 1.1.5)

both on Redhat 5.0 and 5.1, using 1.1-Applets without problems. What
was your problem exactly?

Ulli

-- 
ETH Zentrum, IFW B43, CH-8092 Zürich
Phone +41-1-63 27393 // FAX +41-1-63 21172





Re: Problem with AWT and swing

1998-06-09 Thread Ulrich Kortenkamp

> "Chetan" == Chetan Kumar <[EMAIL PROTECTED]> writes:
Chetan> Now the problem is that when I activate the menu, the
Chetan> pulldown menu come behind the canvas. i.e some item of the
Chetan> menu are hidden behind the canvas.

Hava a look at 

http://java.sun.com/products/jfc/swingdoc-archive/mixing.html

which explains the problem in detail.

What you should do: Subclass JComponent instead of Canvas. This makes
your "canvas" lightweight and Swing-compatible (e.g. you can add a
tooltip).

Best regards,

Ulli
-- 
ETH Zentrum, IFW B43, CH-8092 Zürich
Phone +41-1-63 27393 // FAX +41-1-63 21172




Acclerator Key events

1998-06-09 Thread Chetan Kumar


Greetings,

(Hello Mr Lei ! )AccleratorKey events methods are associated with
Menuitems, but now that I have Menubar how do I set hot heys. I tried the
same but it did not worked (Obvious ?). Help please... 

with thanks
chetan . S

E-mail [EMAIL PROTECTED]

WEB PAGE - http://pclab.ece.iisc.ernet.in/chetan

Phone 
work place
(080)3092282
res.
(080)3349218  
(080)3347220




Re: Problem with AWT and swing

1998-06-09 Thread sml13

I may be wrong about this, but I believe AWT and Swing componenets are 
NOT supposed to be mixed like that (layered, that is), unless you want 
the AWT components to always be on top.  This is because (correct me if 
I'm wrong, someone, but I vaguely recall reading this on one of those 
Swing tutuorials on developer.javasoft.com) AWT components use native 
peers which always bully out your "lightweight", pure Java components.  
It is a technical difficulty inherent in the difference between the way 
the AWT and Swing components work (i.e., peer-based vs. non-peer-based).

Solutions?: Well, you could make your own "lightweight" Canvas (your own 
JCanvas) by extending Canvas, I think.  I'm not sure if or how this would 
solve the problem, though, as all Swing components are subclasses of 
Canvas as it is.  Hmmm...

Shane

On Tue, 9 Jun 1998, Chetan Kumar wrote:

> 
> Hello, it is same old problem, I am sorry if it is repeated. I tried this.
> 
> 1) Create a pulldown menu, JMenu.
> 2) Create a canvas, I did not find swing component for canvas, if there is
> please letme know.
> 3) Add canvas to JPanel,
> 4) Add JPanel and JMenu to Jframe.
> 
> Now the problem is that when I activate the menu, the pulldown menu come
> behind the canvas. i.e some item of the menu are hidden behind the canvas.
> 
> Any help ??
> 
> with thanks
> -Chetan 
> 
> 




Re: Netscape 4.05

1998-06-09 Thread Ulrich Kortenkamp

> "Azazel" == Azazel  <[EMAIL PROTECTED]> writes:

Azazel> I've just installed the JDK1.1 prerelease again and this
Azazel> time I sorted out the problem that cropped up last time,
Azazel> that I needed to have the Netscape archive
Azazel> (${MOZILLA_HOME}/java/classes/java40.jar) before the JDK
Azazel> archive in $CLASSPATH, - or so I thought.

I never set the CLASSPATH (better: when using the rpm version of the
JDK I explicitely unset it) before I run Netscape. If I really need a
classpath I set it to include only ${JAVAHOME}/lib/classes.zip and the
additional directories I am working with. Actually, I think it is a
much better idea how the whole thing is handled with the jre ---
always have a default classpath and just add elements with "-cp".

So: Try to just unset the CLASSPATH and look if this works for you.

Ulli




Re: can't execute java or other utils

1998-06-09 Thread Uncle George

sometimes it happens that the libs/loader libs are not found be the kern. this
happened to me when i went from 4.1 to 5.0.  never figured out why, but those
executable were just not runnable on 5.0 :(

B. Craig Taverner wrote:

> > explicitly specified the file (i.e. "./java").  I always get "command
> > not found".
>
> This can also happen if the '#!' line at the beginning of the script (java
> is a script) can not be found.  My java has #!/bin/sh which should
> definitely be in the path on any linux machine, but perhaps your script is
> different or you don't have /bin/sh which is normally a soft link to
> /bin/bash.
>
> Cheers, Craig
>






Re: Core dump trying to use JNI under Linux-alpha port

1998-06-09 Thread Uncle George

yup,
My first attempt to fix this was to change the way the internal java
stack was organised. stack items are 64 bits wide ( due to pointers )
rather than doubled and longs, which on a 32 bit world occupy 2 stack
slots. So while i can store a double, long, and a pointer into a 64 bit
alpha stack item, the jvm still wants to work in 32bit/slot/stack item
mode, and will allocate 2 items for a double, and long.
Seemed simple enough at first, just fix all the code to accept 64
bit stack items. EXCEPT, it seems that the java byte-code also wants to
load, and store on 32bit offsets on the stack. fudge, and that caused
all sorts of phase problems with method calls. so had to drop the
effort, as it appears it will never work.
So I went back to assembler.
after that one finds out that the load double, and load float machine
instructions have to match the call stack signature - more work. And now
that I am writing this, i have to check be sure that double/float
returns from JNI are also stored properly.
I should have this v10 of the alpha jdk avail by late afternoon.
gat


Brett W Vasconcellos wrote:

> I have a native method:
>
> public native void foo(int a, double b, double c);
>
> When I call it: foo(2, 600, 32000) from Java,
> C reports a=2, b=600, but c=2.38778e-314.
> Let me know if you can't reproduce it.
>
> Brett






Mirror Downtime: Apology

1998-06-09 Thread Joshua Pollak

An upgrade to RedHat 5.1 went, shall we say, less smoothly than planned.
However, RH is happy once again, and the pico.org mirrors live again.

  

Joshua Pollak
http://josh.pico.org




Problem with AWT and swing

1998-06-09 Thread Chetan Kumar


Hello, it is same old problem, I am sorry if it is repeated. I tried this.

1) Create a pulldown menu, JMenu.
2) Create a canvas, I did not find swing component for canvas, if there is
please letme know.
3) Add canvas to JPanel,
4) Add JPanel and JMenu to Jframe.

Now the problem is that when I activate the menu, the pulldown menu come
behind the canvas. i.e some item of the menu are hidden behind the canvas.

Any help ??

with thanks
-Chetan 




java 1.2 ??

1998-06-09 Thread c . baudoin . alcatel

A:  INTERNET--IBMMAIL

De:cedric BAUDOIN
ALCATEL ESPACE - DSPS/DESR - service simulation systeme
tel:33.(0)5.61.19.68.17 email:c.baudoin.alcatel(a)e-mail.com
Objet:   java 1.2 ??
hello

is there any known date for java 1.2 ?

best regards,
cedric baudoin
c.baudoin.alcatel(a)e-mail.com

salutations.




Re: RH5.0 and JDK1.1.?

1998-06-09 Thread Azazel

> > Also, is there a working Netscape for RH5.0?
> >
> 
> My copy is 4.05, and it works fine.

Has anyone managed to get JDK1.1-complete preview version
of 4.05 working under RH 5.0/5.1?  The Java was decidedly
flaky, when I installed it.

Az. >-)=




Re: RH5.0 and JDK1.1.?

1998-06-09 Thread Pete Hardie

Thanks to everyone who has told me what I wanted to know.  I hope to
spend some
time this weekend upgrading everything.


-- 
Pete Hardie   |   Goalie, DVSG Dart Team
Scientific Atlanta|
Digital Video Services Group  |




Netscape 4.05

1998-06-09 Thread Azazel

I've just installed the JDK1.1 prerelease again and this time I sorted
out the problem that cropped up last time, that I needed to have the
Netscape archive (${MOZILLA_HOME}/java/classes/java40.jar) before the
JDK archive in $CLASSPATH, - or so I thought.

This had the unfortunate effect of confusing the JDK binaries which
got to the NS jar first too.  I've taken the NS jar out of the default
classpath and written a 5-line script to put it back in for Netscape.
This *seems* to work.  I know some of you have 4.05-with-1.1 up and
running and I was wondering whether you had had all this fuss and bother.




Re: java 1.2 ??

1998-06-09 Thread Ron Yorston


cedric baudoin wrote:

>is there any known date for java 1.2 ?

Don't know about Linux, but the latest information on the Java
Developer Connection is that JDK 1.2 beta 4 is due out 29 June and the
final release will be 21 September.  That'll be for Windows and
Solaris.

http://developer.java.sun.com/developer/technicalArticles/monicap/Roadmaps/sched.html

Ron




Re: VB and Access == Java and ????

1998-06-09 Thread Carl_E_Tallis





From: Carl E Tallis@ERS_TYSONS on 06/09/98 12:34 PM

Have you looked at Jeevan?  It's a(nother) pure Java implementation of a
DB.  I haven't used it, but the demos are great.  It's similar to the PSE
solution that others have mentioned, but it seems simpler than ODI's
product.





[EMAIL PROTECTED] on 05/28/98 11:06:43 AM

To:   Carl E Tallis/ERS
cc:
Subject:  VB and Access == Java and 






Thanks for all the responses! Most people suggested an rdbms with JDBC
which is something I'll look into.
But, seeing as how I know that there will be only about 2000 objects, what
if I just read them in and put them in a vector/linked list/hash table. In
your experience would that slow the app down/bloat it out too much for
comfort?
If it was C++ I wouldn't even worry about it.

Eric








FIFO's

1998-06-09 Thread James Cassidy


I'd like to access FIFO's with Java under Slackware linux 2.0.0.
When I try to open a FileInputStream on the fifo file, things
just stop.  I'm using 1.1.6.

I've read that:

"An error in the green threads implementation (Solaris). Try running
it with native threads (load the native threads add-on and set
the environment variable THREADS_FLAG to "native")."

This seems to be the case here too.  Is there a native threads
for linux?  Is there a fix or work around?

Thanks,
Jim.






Linux Alpha JDK availability

1998-06-09 Thread Abi Harbani

Does it really exist?  I checked http://www.voicenet.com/~gatgul/JDK
several times and never been successfully uncompress/untar the tgz
file.  The today's JDK in there has 1.3M in size.  I think it's
corrupted since it's a little small...  Is there any other reliable
source that I can go to grab the latest alpha binaries? (I assume it's
the 115 v10?).  Thanks,

-- Abi