It's not a secret anymore!*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes RHE page 308 error????? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "RHE page 308 error?????" Watch "RHE page 308 error?????" New topic
Author

RHE page 308 error?????

Kevin Hou
Greenhorn

Joined: Jan 18, 2001
Posts: 27
Hi,
In RHE second edition, page 308---chapter 9 Layout Managers
Does somebody has a chance to run the code of card layout(page 308 -311).
I try to compile the code, i always get the error:
p is already defined in Card...
if I change the following p to p1,p2, p3, p4, the code works fine.
Is it a error or I am wrong? Help me figure it out
Thank you!!!
Susan Hoover
Ranch Hand

Joined: Jan 04, 2001
Posts: 64
What line numbers are you talking about? My RHE 2nd ed only declares p once, on line 21:
<pre>
Panel p = new Panel();
</pre>
Then on lines 29, 37, and 45, we reuse the Panel reference p as follows:
<pre>
p = new Panel();
</pre>
Notice that this line is different from the first one. Are you sure you didn't make a mistake while copying and pasting? (It's a PITA to have to retype all of the examples in the book. You can't even copy them out of the PDF files on the CD.)
BTW, the errata are here.
--
Susan
[This message has been edited by Susan Hoover (edited January 18, 2001).]
Kevin Hou
Greenhorn

Joined: Jan 18, 2001
Posts: 27
Thank you!
I make a mistake!
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

You can't even copy them out of the PDF files
you can do cut/copy/paste from pdf files. change your cursor
from the hand to the Text select tool you see on
the top when you view the Tool Bar (the T). This will allow you
to select the text and copy. I am using AcroRead 4.0.
regds.
- satya

Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
David Celano
Greenhorn

Joined: Jan 09, 2001
Posts: 17
The Select Text option seems to be disabled, at least on my copy of the CD (from the second edition book). It does make things difficult. I was hoping to copy and paste selected parts of the text into a condensed study sheet for the areas I need to focus on, but I don't think this will be possible. If there's something I've overlooked, please let me know. Thanks :- )
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: RHE page 308 error?????