473,545 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Java how to program errata

In Java How to program, 5th edition, I can not get past the example in
chapter 3, page 89 to page 96. Is there some errata for this?
I did not/could not load all the tools. I am coming from Slick edit
and from Dos, and they both say that my copying of that example is
flawed.

Now I made a change: the name of the file is Lab2.java, the html file
is Lab2.html.

The contents of my Java file is:
// fig 3.6 welcome Applet.java
// A first applet in Java

// Java packages
import java.awt.Graphi cs; // import class graphics
import javax.swing.JAp plet; // import class JApplet

public class Lab2 extends JApplet {
// draw text on applets background
public void paint ( Graphics g )
{
// call super class version of the method paint
super.paint( g );
// draw a string at the x-coordinate 25 and y coordinate 25
g.drawString( "Welcome to Java Programming", 25,25);

}// end method paint
}// end class Lab2

The contents of the Html file is:
<html>
<applet code=Lab2.class " width="300" height= "45">
</applet>
</html>

I am trying to learn Java on my own, and would greatly appriciate any
assistance you can give.
Sean
Jul 17 '05 #1
3 2399
se**********@ho tmail.com (Sean Cleary) wrote in message news:<1c******* *************** ****@posting.go ogle.com>...
In Java How to program, 5th edition, I can not get past the example in
chapter 3, page 89 to page 96. Is there some errata for this?
I did not/could not load all the tools. I am coming from Slick edit
and from Dos, and they both say that my copying of that example is
flawed.

Now I made a change: the name of the file is Lab2.java, the html file
is Lab2.html.

The contents of my Java file is:
// fig 3.6 welcome Applet.java
// A first applet in Java

// Java packages
import java.awt.Graphi cs; // import class graphics
import javax.swing.JAp plet; // import class JApplet

public class Lab2 extends JApplet {
// draw text on applets background
public void paint ( Graphics g )
{
// call super class version of the method paint
super.paint( g );
// draw a string at the x-coordinate 25 and y coordinate 25
g.drawString( "Welcome to Java Programming", 25,25);

}// end method paint
}// end class Lab2

The contents of the Html file is:
<html>
<applet code=Lab2.class " width="300" height= "45">
</applet>
</html>

I am trying to learn Java on my own, and would greatly appriciate any
assistance you can give.
Sean


This time the error message suggests that it can not find the
Lab2.class file that is in the same directory. And does so even if the
DOS utilities are used. Last time it was different, but I was
struggling to learn how to change my editor to work well with HTML
execution. Not that the error message then had anything to do with the
HTML. So I have tried twice, and with all the fussing around, feels
like more than twice.
Sean
Jul 17 '05 #2
Sean,

Please provide the exact commands you issued and the response from the
program. Include what directory you issued the commands from and the
contents of that directory and any other relevant ones.

Ray

--
XML is the programmer's duct tape.
Jul 17 '05 #3
Raymond DeCampo <rd******@spam. twcny.spam.rr.s pam.com.spam> wrote in message news:<vh******* ************@tw ister.nyroc.rr. com>...
Sean,

Please provide the exact commands you issued and the response from the
program. Include what directory you issued the commands from and the
contents of that directory and any other relevant ones.

Ray


Ray,
Thank you for your patience. I was gone a few days.
Here is the Dos side of things: (actually the error message is from
the slick edit side, but is identical on the DOS side):
Volume in drive D has no label
Volume Serial Number is 3FBD-636D
Directory of D:\jlab\Lab2

.. <DIR> 08-18-04 3:45p .
... <DIR> 08-18-04 3:45p ..
LAB2 VPW 197 08-18-04 3:46p Lab2.vpw
LAB2~1 VPW 814 08-21-04 6:49p Lab2.vpwhist
LAB2 VPJ 9,447 08-18-04 4:27p Lab2.vpj
LAB2 VTG 90,112 08-18-04 5:30p Lab2.vtg
CLASSES <DIR> 08-18-04 4:02p classes
LAB2~1 HTM 80 08-18-04 4:42p Lab2.html
LAB2~1 JAV 577 08-18-04 5:31p Lab2.java
LAB2 VPB 8,192 08-18-04 4:14p Lab2.vpb
LAB2~1 CLA 395 08-18-04 4:30p Lab2.class
LAB2DOS TXT 36 08-21-04 6:52p lab2dos.txt
PATH TXT 238 08-21-04 6:50p path.txt
DIR TXT 0 08-21-04 6:53p dir.txt
11 file(s) 110,088 bytes
3 dir(s) 11,260.27 MB free

Volume in drive D has no label
Volume Serial Number is 3FBD-636D
Directory of D:\jlab\Lab2

.. <DIR> 08-18-04 3:45p .
... <DIR> 08-18-04 3:45p ..
LAB2 VPW 197 08-18-04 3:46p Lab2.vpw
LAB2~1 VPW 814 08-21-04 6:49p Lab2.vpwhist
LAB2 VPJ 9,447 08-18-04 4:27p Lab2.vpj
LAB2 VTG 90,112 08-18-04 5:30p Lab2.vtg
CLASSES <DIR> 08-18-04 4:02p classes
LAB2~1 HTM 80 08-18-04 4:42p Lab2.html
LAB2~1 JAV 577 08-18-04 5:31p Lab2.java
LAB2 VPB 8,192 08-18-04 4:14p Lab2.vpb
LAB2~1 CLA 395 08-18-04 4:30p Lab2.class
LAB2DOS TXT 36 08-21-04 6:52p lab2dos.txt
PATH TXT 238 08-21-04 6:50p path.txt
DIR TXT 0 08-21-04 6:53p dir.txt
11 file(s) 110,088 bytes
3 dir(s) 11,260.27 MB free

by using dos commands I should be able to cut through the slick edit
problems, but I get the same thing anyway.
Sean
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

55
45930
by: Elijah | last post by:
I have read many of the topics on learning C++ or Java first. It seems like everyone says something different. I would like to know if I should learn C++ or Java. First a little about myself. I know PHP, BASIC, and of course HTML. I'll be 15 years old in September. I am interested in programming GUI applications. I am also interested in...
1
340
by: Charles L | last post by:
Does anyone know where I can find errata for Stan Lippman's 'C++ Primer 2nd Edition'? Charles Leng
7
1379
by: Fraser Ross | last post by:
http://erdani.org/errata/ I'm using IE6 which might not be compatible with this page. I've tried the lowest security setting. All I get is the error nosh. Is the page working for anyone else? Fraser.
1
9599
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej and I was wondering if anyone here would be able to give me some tips for young players such as myself, for learning the language. Is this the...
0
1941
by: cincerite | last post by:
Hello , guys , I'm reading C++ Primer 3rd edition recently.I tried to download the errata of it from Stan Lippman's Home Page:http:// staff.develop.com/slip/ ,but it says:We're Sorry, we could not find requested page: http://www.develop.com/hp/slip/errata_prim_3.pdf . It seems the website haven't been maintained for a long time,and the E-...
10
2760
by: Zach | last post by:
I am looking for a comprehensive list of errors in Kernighan & Ritchie's "The C Programming Lanuage: 2nd Edition (ANSI C)" Also what is the best way to work through the list with the Errata? I don't want to constantly refer back to the Errata since that may slow down my learning but I also don't want to learn something that isn't 100%...
0
140
by: Ioannis Vranos | last post by:
Eric Sosman wrote: Well, if we all provided solutions for the ambiguous errata of K&R2 and posted them here and sending them to K&R errata site, and/or perhaps added to clc FAQ, I think would be useful to all. Myself am going to post here and send to that K&R errata site all the solutions I implemented for the ambiguous errata I have...
7
185
by: Ioannis Vranos | last post by:
In K&R2 errata page <http://www-db-out.research.bell-labs.com/cm/cs/cbook/2ediffs.html> there are some ambiguous errata, for which I propose solutions. Any comments are welcome. Ambiguous errata (mentioned first) of "The C Programming Language" 2nd Edition errata page (http://www-db-out.research.bell-labs.com/cm/cs/cbook/2ediffs.html),...
0
10722
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information inside an image, hide your complete image as text ,search for a particular image inside a directory, minimize the size of the image. However this is not...
0
7487
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7680
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7934
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6003
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5349
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4966
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3459
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1033
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
731
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.