100% found this document useful (1 vote)
13 views

Java ME game programming 2nd ed Edition John P Flynt download

The document provides a download link for 'Java ME Game Programming, 2nd Edition' by John P. Flynt and Martin J. Wells, along with ISBN details and publication information. It includes a list of additional recommended books related to Java and game programming, with corresponding download links. The content outlines the structure of the book, covering mobile device fundamentals and Java ME overview.

Uploaded by

upolaahya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
13 views

Java ME game programming 2nd ed Edition John P Flynt download

The document provides a download link for 'Java ME Game Programming, 2nd Edition' by John P. Flynt and Martin J. Wells, along with ISBN details and publication information. It includes a list of additional recommended books related to Java and game programming, with corresponding download links. The content outlines the structure of the book, covering mobile device fundamentals and Java ME overview.

Uploaded by

upolaahya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

Java ME game programming 2nd ed Edition John P

Flynt pdf download

https://ebookfinal.com/download/java-me-game-programming-2nd-ed-
edition-john-p-flynt/

Explore and download more ebooks or textbooks


at ebookfinal.com
Here are some recommended products for you. Click the link to
download, or explore more at ebookfinal

Beginning Java SE 6 Game Programming 3rd Edition Jonathan


S. Harbour

https://ebookfinal.com/download/beginning-java-se-6-game-
programming-3rd-edition-jonathan-s-harbour/

Simply Java An Introduction to Java Programming


Programming Series 1st Edition James Levenick

https://ebookfinal.com/download/simply-java-an-introduction-to-java-
programming-programming-series-1st-edition-james-levenick/

Black like me 2nd ed Edition Griffin

https://ebookfinal.com/download/black-like-me-2nd-ed-edition-griffin/

Beginning Java ME Platform 1st Edition Ray Rischpater

https://ebookfinal.com/download/beginning-java-me-platform-1st-
edition-ray-rischpater/
Elements of Programming Interviews in Java 2nd Edition
Adnan Aziz

https://ebookfinal.com/download/elements-of-programming-interviews-in-
java-2nd-edition-adnan-aziz/

Game Programming Gems 3 Game Programming Gems Series v 3


1st Edition Dante Treglia

https://ebookfinal.com/download/game-programming-gems-3-game-
programming-gems-series-v-3-1st-edition-dante-treglia/

Game Programming Gems 2 Game Programming Gems Series Vol 2


1st Edition Mark Deloura

https://ebookfinal.com/download/game-programming-gems-2-game-
programming-gems-series-vol-2-1st-edition-mark-deloura/

Cross Platform Game Programming Game Development 1st


Edition Steven Goodwin

https://ebookfinal.com/download/cross-platform-game-programming-game-
development-1st-edition-steven-goodwin/

Java programming from problem analysis to program design


5th ed Edition D S Malik

https://ebookfinal.com/download/java-programming-from-problem-
analysis-to-program-design-5th-ed-edition-d-s-malik/
Java ME game programming 2nd ed Edition John P
Flynt Digital Instant Download
Author(s): John P Flynt, Martin J. Wells
ISBN(s): 9781598633894, 1598633899
Edition: 2nd ed
File Details: PDF, 9.02 MB
Year: 2007
Language: english
tm
Java ME
Game
Programming
Second Edition

John P. Flynt, Ph.D.


Martin Wells
ß 2008 Thomson Course Technology, a division of Thomson Learning Publisher and General Manager,
Inc. All rights reserved. No part of this book may be reproduced or Thomson Course Technology PTR:
transmitted in any form or by any means, electronic or mechanical, Stacy L. Hiquet
including photocopying, recording, or by any information storage or
retrieval system without written permission from Thomson Course Associate Director of Marketing:
Technology PTR, except for the inclusion of brief quotations in a review. Sarah O’Donnell

The Thomson Course Technology PTR logo and related trade dress are Manager of Editorial Services:
trademarks of Thomson Course Technology, a division of Thomson Heather Talbot
Learning Inc., and may not be used without written permission.
Marketing Manager:
Java is a trademark of Sun Microsystems, Inc. in the United States and Jordan Casey
other countries.
Senior Acquisitions Editor:
All other trademarks are the property of their respective owners. Emi Smith
Important: Thomson Course Technology PTR cannot provide software
Marketing Assistant:
support. Please contact the appropriate software manufacturer’s
Adena Flitt
technical support line or Web site for assistance.
Project Editor:
Thomson Course Technology PTR and the author have attempted
Jenny Davidson
throughout this book to distinguish proprietary trademarks from
descriptive terms by following the capitalization style used by the Technical Reviewer:
manufacturer. Marcia Flynt
Information contained in this book has been obtained by Thomson
PTR Editorial Services Coordinator:
Course Technology PTR from sources believed to be reliable. However,
Erin Johnson
because of the possibility of human or mechanical error by our sources,
Thomson Course Technology PTR, or others, the Publisher does not Copy Editor:
guarantee the accuracy, adequacy, or completeness of any information Anne Smith
and is not responsible for any errors or omissions or the results
obtained from use of such information. Readers should be particularly Interior Layout Tech:
aware of the fact that the Internet is an ever-changing entity. Some facts ICC Macmillan Inc.
may have changed since this book went to press.
Cover Designer:
Educational facilities, companies, and organizations interested in Mike Tanamachi
multiple copies or licensing of this book should contact the Publisher
for quantity discount information. Training manuals, CD-ROMs, and CD-ROM Producer:
portions of this book are also available individually or can be tailored Brandon Penticuff
for specific needs.
Indexer:
ISBN-10: 1-59863-389-9 Larry Sweazy
ISBN-13: 978-1-59863-389-4
eISBN-10: 1-59863-627-8 Proofreader:
Library of Congress Catalog Card Number: 2007923304 Heather Urschel
Printed in the United States of America
08 09 10 11 12 TW 10 9 8 7 6 5 4 3 2 1

Thomson Course Technology PTR,


a division of Thomson Learning Inc.
25 Thomson Place
Boston, MA 02210
http://www.courseptr.com
This book is dedicated to its readers.
Acknowledgments

Thanks to Emi Smith and Stacy Hiquet for arranging for the publication. To
Jenny Davidson, for watching over the schedule and making it happen. Also,
many thanks to Kevin Claver for help and support along the way. As always,
thank you Marcia for your faithful hard work, trust, guidance, and support.
About the Authors

John P. Flynt, Ph.D., has taught at colleges and universities, and has authored
courses and curricula for several college-level game development programs. His
academic background includes work in information technology, the social sci-
ences, and the humanities. Among his works are In the Mind of a Game, Perl
Power!, Java Programming for the Absolute Beginner, UnrealScript Game Pro-
gramming All in One (with Chris Caviness), Software Engineering for Game
Developers, Simulation and Event Modeling for Game Developers (with Ben Vin-
son), Pre-Calculus for Game Developers (with Boris Meltreger), Basic Math
Concepts for Game Developers (with Boris Meltreger), and Unreal Tournament
Game Programming for Teens (with Brandon Booth). John lives in the foothills
near Boulder, Colorado.
Martin J. Wells is currently the lead programmer at Tasman Studios Pty, Ltd,
located in Sydney, Australia. Throughout his 15-year career he has worked on a
wide variety of development projects. He is an expert in multiple computer
languages, including Java from its origins, and has extensive experience in the
development of high-performance networking and multithreaded systems. His
first game programming experience came from writing and selling his own games
for the Tandy and Commodore microcomputers at the age of 12.
Contents

About This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv

PART I MOBILE DEVICE FUNDAMENTALS . . . . . . . . . . . . . . . . . . . 1

Chapter 1 Java ME History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3


Java’s Acorn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Java’s Growth in the Sun. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
What Is Java? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Multiple Editions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Mobile Information Devices Everywhere . . . . . . . . . . . . . . . . . . . . 11
Micro Devices and Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Chapter 2 Java ME Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15


A Comprehensive Toolkit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Java ME Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Configurations and Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
The CDC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
The CLDC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
CLDC Target Device Characteristics. . . . . . . . . . . . . . . . . . . . . . . . . 22
CLDC Security Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Virtual Machine Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Application Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Application Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

vi
Contents vii

Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Finalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Old and New Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
JVM Differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
CLDC Packages and Class Libraries . . . . . . . . . . . . . . . . . . . . . . . . . 28
MIDP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Target Hardware Environment . . . . . . . . . . . . . . . . . . . . . . . . . 32
Target Software Environment . . . . . . . . . . . . . . . . . . . . . . . . . . 32
MIDP Packages and Class Libraries . . . . . . . . . . . . . . . . . . . . . . . . . 34
MIDP 2.0 Game Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
MID Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
MID Run-Time Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
MID Suite Packaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Java Application Descriptors . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
MIDP 2.0 and MIDP 1.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

Chapter 3 Java ME-Enabled Devices . . . . . . . . . . . . . . . . . . . . . . . . 45


MID Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Nokia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Series 30 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Series 40 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Series 60 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Series 80 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Series 90 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Sony Ericsson . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
K310 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Sony Ericsson Z520 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Motorola . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Motorola A830. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
iDEN Phones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Motorola E550 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

PART II SET TING UP FOR DEVELOPMENT . . . . . . . . . . . . . . . . . . . 59

Chapter 4 The JDK, the MIDP, and a MIDlet Suite . . . . . . . . . . . . . 61


Getting the Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Installing and Setting Up the JDK . . . . . . . . . . . . . . . . . . . . . . . . . 63
viii Contents

Obtaining the JDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63


Starting Your Windows JDK Installation . . . . . . . . . . . . . . . . . . 64
JDK Installation and Setup Continued . . . . . . . . . . . . . . . . . . . . 65
Copying Path Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Setting the Path and CLASSPATH Variables . . . . . . . . . . . . . . . . 66
Testing Your Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Installing and Setting Up the MIDP . . . . . . . . . . . . . . . . . . . . . . . . 68
Copying the MIDP to a Directory . . . . . . . . . . . . . . . . . . . . . . . 69
Copying the Paths of the MIDP. . . . . . . . . . . . . . . . . . . . . . . . . 70
Setting the PATH and CLASSPATH Variables . . . . . . . . . . . . . . . 72
Setting MIDP_HOME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Verifying the MIDP Configuration. . . . . . . . . . . . . . . . . . . . . . . 74
Setting Up a Working Directory. . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Creating a MIDlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Compiling Your Application . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Using Preverify with the Class File. . . . . . . . . . . . . . . . . . . . . . . 79
Running Your MIDlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Creating the Full Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Hello, Again. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Building the Class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Creating the Manifest and JAR . . . . . . . . . . . . . . . . . . . . . . . . . 84
Creating the JAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Running the MIDlet Suite Package . . . . . . . . . . . . . . . . . . . . . . 87
Modifying the JAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

Chapter 5 Using the Java Wireless Toolkit 2.5 . . . . . . . . . . . . . . . . 91


Development Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
The Java Wireless Toolkit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Installing the Toolkit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
The Basic WTK 2.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Creating a New Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Creating the HelloToolkit Source Code . . . . . . . . . . . . . . . . . . 102
Building and Running HelloToolkit.java . . . . . . . . . . . . . . . . . 106
Creating JAD, JAR, and Manifest Files . . . . . . . . . . . . . . . . . . . 108
JWT Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

Chapter 6 Using NetBeans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111


The NetBeans IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Contents ix

Installing NetBeans. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113


Sanity Check the IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Adding Mobility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Downloading Mobility Packages . . . . . . . . . . . . . . . . . . . . . . . 119
Installing the CDC Mobility Package . . . . . . . . . . . . . . . . . . . . 120
Installing the Basic Mobility Package . . . . . . . . . . . . . . . . . . . 121
Confirming Mobile and CDC . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Creating a MIDlet Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Adding Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
The JAD and JAR Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Adding the Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Changing the JAD File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

PART III TEXT-ORIENTED ACTIVITIES . . . . . . . . . . . . . . . . . . . . . . 137

Chapter 7 Java ME API Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139


MIDP API Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
The MIDlet Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
The LifecycleTest Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Imports and Construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Starting and Stopping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Closing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Command Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Using Timer and TimerTask Objects . . . . . . . . . . . . . . . . . . . . . . . 150
The TimerTest Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Imports and Construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Canceling Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
The Inner PrintTask Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
The Connector Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
The HttpConnection Interface. . . . . . . . . . . . . . . . . . . . . . . . . 158
The NetworkingHTTPTest Class . . . . . . . . . . . . . . . . . . . . . . . . 159
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

Chapter 8 Persistence with the RMS . . . . . . . . . . . . . . . . . . . . . . . 165


Persistence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
The RecordStore Class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
The RecordStoreTest Class. . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
x Contents

Construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Adding Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Retrieving and Displaying Records . . . . . . . . . . . . . . . . . . . . . 176
Closing and Destroying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Deleting Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Updating Records. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Record Enumerations and Record Stores . . . . . . . . . . . . . . . . . . . 181
The RecEnumTest Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Vectors and Enumerations . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
RecordStores and RecordEnumerations . . . . . . . . . . . . . . . . . . 189
Using a RecordComparator Object . . . . . . . . . . . . . . . . . . . . . . . . 190
The ComparatorTest Class. . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Use with the enumerateRecords() Method . . . . . . . . . . . . . . . 196
Specializing the RecordComparator Interface . . . . . . . . . . . . . 197
Using a RecordFilter Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
The FilterTest Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
FilterTest Construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Specializing the RecordFilter Interface . . . . . . . . . . . . . . . . . . 204
Using RecordListener Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
The RecordListenerTest Class. . . . . . . . . . . . . . . . . . . . . . . . . . 206
RecordListenerTest Construction . . . . . . . . . . . . . . . . . . . . . . . 212
Assigning Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
RecordListener Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Specializing the RecordListener Interface . . . . . . . . . . . . . . . . 215
Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217

Chapter 9 User Interface Basics . . . . . . . . . . . . . . . . . . . . . . . . . . 219


User Interface (LCDUI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Class Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Display and Displayable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
The DisplayTest Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Command and CommandListener . . . . . . . . . . . . . . . . . . . . . . 229
TextBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Alert and AlertType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
The NameGameTest Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Construction and Definition . . . . . . . . . . . . . . . . . . . . . . . . . . 238
The TextBox Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Alert Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Contents xi

Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Lists with Single Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Construction and Definition . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Using a Vector Object for Data . . . . . . . . . . . . . . . . . . . . . . . . 248
Processing Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Lists with Multiple Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Construction and Definition . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Processing Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257

PART IV USING GRAPHICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259

Chapter 10 Forms and Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261


General Features of the Item and Form Classes . . . . . . . . . . . . . . 261
The Form Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
TextField. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Playing with Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Construction and Definition . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Processing Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
StringItem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
The ItemPlayTest Class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Definition and Construction . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Using the Bit OR Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Font Definitions, Literal Strings, and Appending . . . . . . . . . . . 283
Spacers and Implicit Appending . . . . . . . . . . . . . . . . . . . . . . . 285
Working with Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290

Chapter 11 Images and Choices . . . . . . . . . . . . . . . . . . . . . . . . . . . 291


ChoiceGroup. . . . . . . . . . . . . . . . . . . . ... ...... . . . . . . . . . . . 291
The ComedyChoiceGroup Class . . . . . . ... ...... . . . . . . . . . . . 292
Class Definition . . . . . . . . . . . . . . . ... ...... . . . . . . . . . . . 298
Defining the Choice Group Object . ... ...... . . . . . . . . . . . 299
Processing Messages . . . . . . . . . . . . ... ...... . . . . . . . . . . . 301
Formatting the Font and Displaying the Results . . . . . . . . . . . 302
The Quotes Class . . . . . . . . . . . . . . ... ...... . . . . . . . . . . . 303
Construction and Definition . . . . . . ... ...... . . . . . . . . . . . 306
ImageItem and Image . . . . . . . . . . . . . ... ...... . . . . . . . . . . . 308
xii Contents

The ImageItemFind Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311


Construction and Definition . . . . . . . . . . . . . . . . . . . . . . . . . . 317
Retrieving Images and Defining an ImageItem . . . . . . . . . . . . 318
Images as an Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321

Chapter 12 Gauges, Dates, Calendars . . . . . . . . . . . . . . . . . . . . . . 323


Calendar and Date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
DateField . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
The CalendarFortune Class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
Construction and Definition . . . . . . . . . . . . . . . . . . . . . . . . . . 331
Using the Date and DateField Classes . . . . . . . . . . . . . . . . . . . 333
Event Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
Generating Events from the Calendar . . . . . . . . . . . . . . . . . . . 335
Prognostication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
Gauge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
The SonnetMaker Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Construction and Definition . . . . . . . . . . . . . . . . . . . . . . . . . . 345
CompositionTask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Displaying the Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
Finishing the Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
Sonnets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Stop and Exit Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351

PART V GAME ORIENTATION . . . . . . . . . . . . . . . . . . . . . . . . . . 353

Chapter 13 Canvas, Graphics, Thread . . . . . . . . . . . . . . . . . . . . . . . 355


Canvas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
CGExplorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
Definition and Construction . . . . . . . . . . . . . . . . . . . . . . . . . . 361
Specializing the Canvas Class . . . . . . . . . . . . . . . . . . . . . . . . . 361
Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
Rectangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
Rendering the Image and Drawing an Arc . . . . . . . . . . . . . . . 366
Translation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
Extended Canvas Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
Contents xiii

GameStart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
Definition and Construction . . . . . . . . . . . . . . . . . . . . . . . . . . 376
The Splash Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
GSCanvas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
GSCanvas Definition and Construction . . . . . . . . . . . . . . . . . . . . . 386
Files, Images, and Colors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
The Runnable Interface and the Thread . . . . . . . . . . . . . . . . . 389
Key Values and Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Different Messages and Keys . . . . . . . . . . . . . . . . . . . . . . . . . 394
Painting and Repainting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Boundaries, Coordinates, and Collisions . . . . . . . . . . . . . . . . . 396
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398

Chapter 14 The Game API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399


The Game API . . . . . . . . . . . . . . . . . . . . . . . . . . ...... . . . . . . 399
GameCanvas . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...... . . . . . . 400
The Sprite Class and Frame Sequences . . . . . . ...... . . . . . . 401
SpriteStart . . . . . . . . . . . . . . . . . . . . . . . . . . . ...... . . . . . . 405
SpritePlay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...... . . . . . . 406
Definition and Construction . . . . . . . . . . . . . . ...... . . . . . . 414
The Frame Sequence . . . . . . . . . . . . . . . . . . . ...... . . . . . . 415
Sprite and Image Creation . . . . . . . . . . . . . . . ...... . . . . . . 417
TiledLayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...... . . . . . . 419
Setting Cells. . . . . . . . . . . . . . . . . . . . . . . . . . ...... . . . . . . 422
Sprite Collisions and Setting and Transforming Images . . . . . . 424
TiledLayer Collisions . . . . . . . . . . . . . . . . . . . . ...... . . . . . . 425
Key Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...... . . . . . . 427
Showing the Position of the Avatar Sprite . . . ...... . . . . . . 428
Clearing, Flushing, and Timing . . . . . . . . . . . . ...... . . . . . . 428
Parent Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . ...... . . . . . . 430
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...... . . . . . . 430

Chapter 15 The Game API and Game Implementation . . . . . . . . . . . 433


Diamond Dasher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
DasherStart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
DasherSprite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
Definition and Construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
Diamond Production . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
Positioning Diamonds. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
xiv Contents

Collisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
DasherCanvas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
Construction and Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
Starting the Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
Running the Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
Boundaries and Random Jumps . . . . . . . . . . . . . . . . . . . . . . . 459
Updating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
Showing the Final Score . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463

Appendix Scrolling Background . . . . . . . . . . . . . . . . . . . . . . . . . . 467


ScrollStart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
ScrollCanvas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
Definition and Construction . . . . . . . . . . . . . . . . . . . . . . . . . . 470

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
About This Book

This book provides an introduction to programming with Java MIDP classes. It


is not intended to fully explore all the potential the MIDP classes offer, nor does it
offer a comprehensive view of Java programming. Instead, it provides an
introduction to the interfaces provided by the MIDP that allow you to extend
your knowledge if you already possess a basic knowledge of how to program with
Java.
The first chapters introduce you to the history of the MIDP and its associated
technologies. In this respect, it is assumed that you have had no previous
exposure to device programming. From there, you move on to set up environ-
ments that allow you to get started. You work wholly on a PC, and instructions
are provided on how to set up all the tools you need to write programs that make
use of the MIDP classes. This book should prove a trusty ally if you have hesitated
to explore device programming because it seems to necessitate learning entirely
new development techniques or accustoming yourself to new programming
environments. Every attempt is made to make the transition into device pro-
gramming as painless as possible. Among other things, comprehensive instruc-
tions are provided concerning how to set up both the appropriate Java packages
and the NetBeans IDE on your PC. No other book on the market provides a more
comprehensive treatment of the basics of setting yourself up for developing
device programs.

xv
xvi About This Book

Who Should Read This Book


This book addresses people who have a background in Java programming at a
beginning or intermediate level. It is not a good idea to turn to this book if you
want to learn how to program. For help in that regard, Java Programming for the
Absolute Beginner (by the same author) provides a suitable foundation for pro-
gramming at the level required by this book.
This book helps you transition into using Java to program for devices. If you
possess a basic understanding of how to program with Java and are seeking a way
to extend your knowledge into the realm of cell phones and other mobile devices,
then this is the book you want. One of its greatest strengths is that during its early
chapters, in addition to helping you understand what mobile devices and mobile
device programming involve, it also closely guides you through the somewhat
esoteric activities of acquiring (free of charge) the software needed to begin
developing programs for mobile devices.
The author enjoys friendships with many professional programmers who have
never attempted to program for devices because they have dreaded having to
learn about and acquire the equipment necessary to begin doing so. This book
attempts to remedy such situations. The equipment needed is freely available and
can be readily installed in a very short time. All of the work with JAR and JAD
files can be automated. The Java Wireless Toolkit provides an attractive, fun
testing environment. The NetBeans IDE provides a free, robust, and increasingly
powerful IDE for use in developing using the Java libraries that address mobile
devices.

The Chapters
Chapter 1 provides a topical review of the history of Java as related to pro-
gramming mobile devices. It provides you with a quick summary of the tools you
use for developing mobile applications and some of the more promising settings
in which to pursue such a line of work.
Chapter 2 furnishes a discussion of the Mobile Information Device Profile
(MIDP) and how it forms the foundation of your work using Java to develop
programs for phones. It also acquaints you with the notion of a MIDlet (as
opposed to an applet). You learn, for example, that at the basis of every Java
program you write for a mobile device is an extension of the Java MIDlet class.
About This Book xvii

Chapter 3 offers a brief overview of some of the devices for which MIDlets can be
written. The devices covered constitute an extremely scant survey of the field.
Still, references to Internet sites providing comprehensive information on
hundreds of possible target devices are provided. No book could possibly hope to
provide a comprehensive view of this topic—even the websites are overwhelmed.
With Chapter 4, the work begins. From the first page or two, you are at the
keyboard installing and tuning Java, and then using the MIDP to build a MIDlet
from scratch. You work at the command line and do everything from scratch. In
the end, however, you have the pleasure of seeing a MIDlet compile.
Chapter 5 is all about the Java Wireless Toolkit. It shows you where to acquire it
and how to use it. Prior to this chapter, you have been working at the command
line only, but now you have a chance to augment your activities by using the Java
Wireless Toolkit. Learning to use it is a stepping-stone to more powerful tools.
Since this book’s goal is to make you as productive as possible as quickly as
possible, in Chapter 6 you learn how to acquire and install the NetBeans IDE and
the components associated with it that allow you to develop MIDlet and other
Java programs directed toward devices. While it is not by any means suggested
that you skip any of the first four chapters, to gain a sense of where the fun begins,
Chapter 6 is the place to go.
Chapter 7 works you into some of the most fundamental topics of the MIDP class
library. Among other things, you explore the MIDlet class and delve into the
Timer and TimerTask classes. Work with these classes anticipates work with the
Runnable interface later in the book.

Chapter 8 concerns persistence and the RMS package. The Java MIDP classes
provide a set of classes that allow you to store and retrieve data in a complex,
robust way. While this is not a database, it does provide a secure way of storing
and accessing data placed in a special reserved location in the memory of the
device. Chapter 8 also introduces you to some of the classes used for networking.
Chapter 9 provides an introduction to the graphical user interface components
offered by the MIDP packages. You can begin seeing the device display different
types of applications, at this point textually oriented. In this regard, you con-
centrate on such classes as Display, TextBox, and List.
Chapter 10 takes you into the world of the Form and Item classes. This provides
interesting contexts in which to work with such classes as TextField and
xviii About This Book

StringItem. As the number of components you work with increases, the MIDlets
you work with become more involved.
Chapter 11 provides a transition. You work with the ChoiceGroup, ImageItem, and
Image classes. The MIDlet you develop provides pictures of famous comedians
and some of their favorite jokes.
Chapter 12 involves you in work on such classes as DateField and Gauge. It also
extends work you have done previously with the Image, Form, and Item classes.
In Chapter 13, you work extensively with the Canvas and Graphics class, devel-
oping MIDlets that show you the fundamentals of game architecture using the
standard GUI classes of the MIDP. What you do in this context provides a solid
grounding for working with the Game API.
With Chapter 14, you work exclusively with such classes as Sprite, TiledLayer,
and GameCanvas. You explore a MIDlet that allows you to see most of the func-
tionality involved in a basic game. This includes understanding how tiles and
frame sets work.
Chapter 15 provides you with a basic game that employs the Sprite, TiledLayer,
GameCanvas, and LayerManager classes in the implementation of a game that
explores collision detection, scoring, use of Thread, Timer, and TimerTask objects,
and other features common in the development of games.
In the appendix, you’ll find an extended discussion of how to implement a
scrolling background. The information here applies as readily to scrolling in the
foreground. Use of the LayerManager allows you to pursue a number of scenarios.

Obtaining the Code for the Book


It is essential to be able to work with the projects the book offers if you are to
benefit from reading the book. In this respect, there are two ways to obtain the
source code:
n From the CD. The CD that accompanies the book provides the most
convenient way to acquire the source code. Just install it as directed.
The source code for each chapter is in a separate chapter file, and
throughout the book, the location of each source file is clearly described. To
access the code from the CD, just insert it in your computer’s CD drive
and access the code folder. The CD should automatically start. If it does not,
you can click the start.exe file on the CD.
About This Book xix

n From the Internet Site. To obtain the code from the publisher’s website,
access www.courseptr.com/downloads and enter the title of the book. You
can access a link to the source code and any resources associated the book
that might be made available after the book’s publication.

Setting Up Files
Instructions on how to compile files are provided in Chapters 4 through 6.
Generally, if you follow the examples in the book, you should find working with
the files fairly easy. If you can install and use the NetBeans IDE (instructions are
provided), you will get the most out of this book.

How to Use This Book


Start with Chapter 1 and work forward from there. It is suggested that you work
through Chapters 4, 5, and 6, and pay close attention to the details they intro-
duce. Unless you establish a comfortable, reliable work setting, there is little hope
that you are going to enjoy programming for devices. Take time to set up and
familiarize yourself with the tools this book introduces. You can then move on
from there.

Conventions
No conventions to speak of have been consciously adopted in the writing of this
book. Generally, the coding style is based lightly on the ‘‘Java Style’’ that has been
popular for several years now, but formatting the code so that it can be included
in the book has often meant that decisions have been made to try to reduce the
number of blank lines. Also, a general practice has been followed of removing
comments from the code and placing them in the body of the text. In this regard,
a system using a pound sign and a number has replaced the practice of referring
to code by its line number. In this book, you see numbers placed at certain
locations in the programs. Reference is then made to these numbers.
Discovering Diverse Content Through
Random Scribd Documents
"That is not all either," she said in a broken voice, sitting on the sofa
again and brushing her handkerchief over her eyes. "Perhaps that girl is not
the only one who is suffering. I wanted to think so well of you, to be so
proud of you. You were to be the defender of women, fighting their battle
for them when they were wronged and helpless. And when you became a
Judge .... Oh, I cannot bear to think of it. You have disappointed and
deceived me. You are not the man I took you to be."

Outside the sun was setting. A dull ray from it was falling on his haggard
face and brushing her bronze-brown hair.

"I thought you loved me too. It was so sweet to think you loved me—me
only—never having loved anybody else. Every woman has felt like that,
hasn't she? I have anyway. Other men might be faithless, but not you, not
Victor Stowell. And yet, for the sake of your poor fancy for this country
girl...."

"Fenella!"

"Oh, what a fool I've been," she cried, leaping up again and dashing the
tears from her eyes. "Forgive you? Never while that girl lies in prison as the
consequence of your sin."

Stowell could bear no more. Stepping forward, he laid hold of Fenella by


the shoulders, and approaching his face to her face he said,

"Listen to me, Fenella. I have done wrong—I know that. I am not here to
excuse or defend myself, and if your heart does not plead for me I have
nothing to say. But I swear before God that I have loved you with all my
soul and strength, and if it hadn't been for that...."

"Loved me!" cried Fenella, between a laugh and a sob. And then in the
wild delirium of the sheer woman, she said,

"What proof of your love have you given to me compared to the proof
you have given to that girl? Oh, when I think of it I could almost find it in
my heart to envy her. I do envy her. Yes, degraded and shamed and
condemned and in prison as she is, I envy her, and could change places with
her this very minute. I would have given you anything in the world rather
than this should be—anything, my honour, myself...."

"Fenella!"

"Let me go! You are driving me mad. Leave me. I hate you. I despise
you. You have broken my heart. I thought you were brave and true, but
what are you but a common...."

"Fenella!"

"Coward! Hypocrite! Let me go!"

But she had no need to wrench herself away from him. His hands fell
from her shoulders like lead, and at the next moment she was gone from the
room.

He stood for a while where she had left him with the echo of her stinging
words ringing in his ears. Bitter, unjust and cruel as they had been, he was
struggling to excuse her. She did not understand. Bessie had not told her all.
Presently she would come back and ask his pardon.

But she did not come, and after a while (it seemed like an eternity),
feeling crushed, degraded, trampled upon, dragged in the dust and wounded
in his tenderest affections, he left the room and the house.

Outside, where his automobile was standing, he still lingered, expecting


to be called back. It was impossible that Fenella would let him part from her
like this. He knew where she was—in the Governor's smoking-room which
overlooked the drive. At the last moment she would knock at the window
and cry, "Stay!"

Slowly he moved around his car, opening the bonnet, touching the
engine, starting it, pulling on his long driving gloves. But still she gave no
sign, and at length he prepared to step into his seat. Was this to be the end—
the end of everything?
Meantime, Fenella, alone in her father's room and recovering from the
storm of her anger, was beginning to be afraid. She wanted to go back to
Stowell and say, "I was mad. I didn't know what I was saying. I love you so
much."

But her pride would not permit her to do that, and she waited for Stowell
to do something. Why didn't he burst through the door, throw his arms
about her, and compel her to forgive him?

She listened intently for a long time, but there came no sound from the
adjoining room. What was he doing? Presently she heard him coming out of
the library, walking with a firm step down the corridor to the porch, opening
the front door and closing it behind him.

Was he leaving her? Like this? Then he would never come back. She
heard his footstep on the gravel and looking through the window she saw
him, with his white face, raising his soft hat to wipe his perspiring forehead,
and then climbing into the car. Could it be possible that he was going away
without another word?

In spite of her jealousy and rage, she felt an immense admiration for the
man who, loving her as she was sure he did, was yet so strong that he could
leave her after she had insulted and humiliated him. She wanted to throw up
the window and cry, "Wait! I am coming out to you."

But no, her pride would not permit her to do that either, and at the next
instant the car was moving away.

She watched it until it had disappeared behind the trees. Then she turned
to go back to her bedroom. At the foot of the stairs she met Miss Green
who, shocked at the sight of her disordered face, said,

"My goodness, Fenella! What has happened?"

In the plaintive voice of a crying child, Fenella answered,

"He has gone. I have driven him away."


Then she stumbled upstairs, locked the door of her room on the inside,
threw herself face down on the bed, burst into a flood of tempestuous tears,
and cried aloud to Stowell, now that he could no longer hear her—

"Victor! Victor! My Victor!"

CHAPTER THIRTY-TWO
THE VOICE OF THE SEA

"Forgive you? Never while that girl lies in prison as the consequence of
your sin."

The words beat on Stowell's brain with the paralysing effect of a muffled
drum. He was driving up the mountain road. Char-à-bancs, full of English
visitors (who were laughing and singing in chorus), were coming down.
The drivers shouted at him from time to time. This irritated him until he
realised that his motor-car was oscillating from side to side of the road.

When he reached the top, where the road turns towards the glen, all the
heart was gone out of him. The great scene no longer brought the old
joyousness. With love lost and hope quenched the soul of the world was
dead, and the heavens were dark above him.

At the bottom of the glen, where it dips into the Curragh, he came upon a
group of bare-headed women, with their arms under their aprons,
surrounding a little person with watery eyes, in a poke bonnet and a satin
mantle. Mrs. Collister had returned from Castletown, and her neighbours
were taking her home.

"Never mind, woman! It will be all set right at the judgment. And then
the man will be found out and punished, too!"
At the corner of the cross roads Dan Baldromma threw himself in front
of the car, to draw it up, and in his raucous voice he fell on Stowell with a
torrent of abuse.

"You've been locking up a respectable man, Dempster, but you can't lock
up his tongue, and the island is going to know what justice in the Isle of
Man can be."

Stowell made no answer. Any poor creature could insult him now.

Janet was waiting for him at Ballamoar, with a fire in the library, and the
tea-tray ready. But the sweet home atmosphere only made him think of the
happiness that had been so nearly within his reach.

Seeing that something was amiss, Janet assumed her cheeriest tone,
brought out two patterns of damask, laid them over chairs, and asked which
Fenella would like best for her boudoir.

"I don't know. I can't say. But .... it doesn't matter now."

Janet gathered up her patterns and went out of the room without a word.

"Forgive you? Never while that girl lies in prison." The stinging words
followed him to his bedroom. They broke up his sleep. They rang like the
screech of an owl through the darkness of the night.

Next day, not trusting himself to drive his car, he returned to Castletown
by train. There were only two first-class compartments and both were full.
He was about to step into a third-class carriage when a voice cried,

"This way, Deemster. Always room enough for you."

There was to be a sitting of the Keys that day and the compartment was
full of northside members. The talk was about yesterday's trial, and Stowell
realised that his management of the case had created a favourable
impression. Merciful to the prisoner? Yes, until her guilt was established,
but then just, even at the expense of friendship.

This led to talk about Gell as the girl's fellow-sinner.


"Shocking! But it's not the first time he has been mixed up with a
woman."

Stowell felt an intolerable shame at Gell's undeserved obloquy and his


own unmerited glory, but he could say nothing.

"It will kill the old man," said one of the Keys. The train had drawn up at
a side station and his voice was loud in the vacant air.

"Hush!"

The Speaker was in the next compartment.

When the train started again a little man with the face of a ferret began to
make facetious references to "Fanny." Stowell's hands were itching to take
the ribald creature by the throat and fling him out of the window, but
something whispered, "Who are you to be the champion of virtue?"

At Court that day, and the day following, he found it hard to concentrate.
At one moment an advocate said,

"Perhaps your Honour is not well this morning?"

"Oh no! I heard you. You were saying...."

The rapidity of his mind enabled him to make up for his lapses in
attention, and when his time came to sum up he was always ready.

He was indulgent to the accused. All the other prisoners were acquitted
—the fat woman for the reason that, bad as her character might be, the
characters of her drunken sailors were yet worse (therefore no credit could
be attached to their evidence), and the boy who had embezzled on the
ground that his superiors at the bank had been guilty of almost criminal
negligence, and the four months he had been in prison already were
sufficient to satisfy the claims of justice.

The boy's mother, who was standing at the back, threw her arms about
him and kissed him when he stepped out of the dock, and then, turning her
streaming face up to the bench, she cried,
"God bless you, Deemster! May you live long and every day of your life
be a happy one."

Back at home, Stowell plunged into the task of drawing up the report for
the English authorities which was to accompany the recommendation to
mercy. In two days (having his father's library to fall back upon) he knew
more about the grounds upon which the prerogative of the Crown could
properly be exercised than anybody in the island had ever before been
required to learn, and when he had finished his task he had no misgivings.

Bessie's sentence would be commuted to imprisonment. And then (life


for the poor soul being at an end in the Puritanical old island) he must find
some secret means of sending her away.

"Never while that girl...." But wait! Only wait!

Being legislator as well as Judge, he attended the first meeting of


Tynwald Court after his appointment. The Governor administered the oath
to him in a private room, and then, taking his arm, led the way to the
legislative chamber.

"Do you know it's six days since you were at Government House, my
boy? What is Fenella to think of you?"

"Has she .... has she been asking for me, Sir?"

"Well, no, not to say asking, but still .... six days, you know."

Stowell sat on a raised daïs between the Attorney-General and Deemster


Taubman, who was sufficiently recovered to hobble in on two sticks. The
proceedings were of the kind that is usual in such assemblies, the Manx
people being the children of their mothers, loving to talk much and about
many things.

He found it difficult to fix his attention, and was watching for an


opportunity to slip away, when the vain repetitions which are called debate
suddenly ceased and the Governor called on an Inspector by Police to carry
round a Bill which had to be signed by all.
In the interval of general conversation that followed, Deemster
Taubman, a gruff and grizzly person, leaned back in his seat, put his thumbs
in the armholes of his soiled white waistcoat and talked to Stowell.

"You did quite right in that case of the girl Collister, Sir. In fact you were
only too indulgent. I have no pity for the huzzies who run away from the
consequences of their misconduct. Murder is murder, and there is no proper
punishment for it but death."

"But the Jury recommended the girl to mercy, and her sentence will be
commuted," said Stowell.

"Eh? Eh? Then you haven't heard what has happened?"

"What?"

"The Governor has reported against the recommendation."

"Reported against it?"

"Certainly. And as the authorities in London are not likely to read the
report and are sure to act on the Governor's advice, the girl will go to the
gallows."

Stowell felt as if he had been struck over the eyes by an unseen hand. As
soon as he had signed the Bill (in a trembling scrawl) he whispered to the
Attorney-General that he was unwell and fled from the chamber.

"Humph!" said Taubman, looking after him. "That young man is going
to break down, and no wonder. His appointment as Deemster was the
maddest thing I ever knew."

II

"No, Mr. Stowell, no! You must stay in bed for the next two days at least.
I must really insist this time. No work, no excitement, no heart-strain.
Remember your father, and take my advice, Sir."

It was Doctor Clucas, who, sent for by Janet, had arrived at Ballamoar
before Stowell got out of bed in the morning.

With closed eyes Stowell reviewed the situation. It was shocking,


horrible, intolerable. Not for fifty years had a woman suffered the full
penalty of such a crime. He must find some way to prevent it.

But after a while a terrible temptation came to him. "Why can't I leave
things alone?" he asked himself.

He had done all he could be expected to do. If the Crown, acting on the
advice of the Governor, refused to exercise its prerogative of mercy, what
right had he to interfere?

It might be best for himself, too, that the law should take its course—
best in the long run. If Bessie's sentence were commuted to imprisonment
what assurance had he that on coming out of prison she would allow him to
send her away from the island? On the contrary she might refuse to be
banished, and if she found that the blame of her misfortune had fallen on
Gell she might tell the truth to free him.

What then? He would be a dishonoured man. His position as a Judge


would be imperilled; his marriage with Fenella would be impossible, and
his whole life would crash down to a welter of disgrace and ruin. But if
Bessie were gone there would be no further danger. And after all, it would
not be he but the law that had taken her life.

"Then why can't I leave things alone?" he thought.

He decided to do so, but his decision brought him no comfort. Towards


evening he got up and went out to walk in the farmyard. There he met
Robbie Creer, who was just home from the mill with his head full of a
pitiful story.

It was about Mrs. Collister. Since her daughter's trial the old woman had
fallen into the habit of walking barefoot in the glen, chiefly at midnight, and
generally in the neighbourhood of the Clagh-ny-Dooiney. At first she had
seen a light. Then she had heard a pitiful cry. She was certain it was the cry
of a child, a spirit-child, unbaptised and therefore unnamed, and for that
reason doomed to wander the world, because unable to enter Paradise. At
length she had taken heart of God and going out in her nightdress she had
called through the darkness of the trees, "If thou art a boy I call thee John. If
thou art a girl I call thee Joney." After that she had heard the cry no more,
and now she knew it had been Bessie's child, and the bogh-millish was at
rest.

This story of the old mother's developing insanity rested heavily on


Stowell's heart and went far to shake his resolution.

After a day or two he began to find his own house and grounds haunted.
He could not go into the library without the kind eyes in his mother's
picture following him about the room with a pleading look. He could not sit
in the dining-room after dinner without remembering his week-ends as a
student-at-law, when his father and he would draw up at opposite cheeks of
the hearth, and the great Deemster would talk of the great crimes, the great
trials and the great Judges.

But his worst ordeal was with Janet. Not a word of explanation had
passed between them, yet he was sure she knew everything. One evening,
going into her sitting-room, he found her with her knitting on her lap, and a
copy of the insular newspaper on the floor, looking out on the lawn with a
far-off expression. That brought memories of another evening when he had
told her that no girl on the island had ever fallen into trouble through him,
or ever should do.

"Ah! Is that you, Victor?" she cried, recovering herself and making her
needles click, but he had gone, and her voice followed him from the room.

Still wrestling with his temptation to stand aside and let the law take its
course, Ballamoar became intolerable to him. On the lame excuse of his
fortnightly court in the northside town he decided to go to Ramsey, and
wrote to Mrs. Quayle to get his old rooms ready.
But going from Ballamoar to his chambers was like leaping out of the
fire into the furnace. When he opened a disordered drawer up came the
Castletown portrait of Bessie Collister like a ghost out of the gloom. When
he went for a walk to tire himself for the night his steps involuntarily turned
towards the pier where the lighthouse had been shattered by lightning.
When he returned and was putting the key in the lock of his outer door he
had the tingling sense of a woman's warm presence behind him. When he
pulled down his bedroom blind the broken cord brought a stabbing memory.
And when he awoke in the morning he felt that he had only to open his eyes
to see a girl's raven black hair on the pillow beside him.

But Mrs. Quayle's presence was the keenest torment of all. The good old
Methodist moved about him at breakfast without speaking, but one
morning, fumbling with her bonnet strings before going, she said,

"Deemster, have you remembered this case of Bessie Collister in your


prayers?"

He removed to Douglas—the Fort Anne Hotel, a breezy place, which sits


on the ledge of the headland and just over the harbour. At first the babble
and movement of the hotel distracted him, but after a day or two he was
drawn back into the maelstrom of his own thoughts.

Having a private sitting-room he borrowed law books from the Law


Library and sat far into the night to read them. He selected the treatises on
Infanticide—those bitter records of the age-long strife between the laws of
man and of God. Particularly he read the charges of the British Judges
(Scottish too frequently), the bewigged ruffians who, in the abomination of
their Puritanical tyranny, and the brutal lust of their judicial vengeance, had
hounded poor women to the gallows in the very nakedness of shame.

"Damn them! Damn them!" he would cry, leaping up with a desire to


trample on the dead Judges' graves. But then the same persistent voice
within would say, "Wait awhile! Who are you to stand up for justice and
mercy?"

Crushed and ashamed he would creep up to bed through the silent house,
and thinking of the girl whose dark eyes had intoxicated him in the glen
(the girl he had afterwards held in his arms) he would say,

"Is it possible that I can stand by and see her given over to the
hangman?"

That terrified him. In the darkness he pictured to himself the scene of


Bessie's death and burial, and thought of his after-life as a Judge, when he
would have to go to Court to try other such cases—and Bessie lying out
there in the prison-yard.

After Ballamoar, with its pastoral tranquillity, the twittering of birds and
the sleepy singing of the streams, Fort Anne was sometimes a tempestuous
place, with the wash of the waves in the harbour, the monotonous moan of
the sea outside and the melancholy wail of the gulls. He thought he heard
Bessie's cry in the voice of the sea—her piercing cry when she was being
carried out of Court after he had sentenced her.

One night he thought Bessie was dead. He was dead too. They were
standing side by side in an awful tribunal and she was accusing him before
God.

"He let me die! He killed me! He is my assassin!"

The sound of his own voice awakened him. A dream! It was the grey of
dawn; a storm had risen in the night; the white sea was rolling over the
breakwater and the sea-fowl were screaming through the mist and roar.

No, by God! If it was a question of Bessie witnessing against him in this


world or in the next, he had no longer any doubt which it should be. No
more temptations! No more hypocrisy and self-doubt! No more wandering
about like a lost soul!

He would go up to the Governor. He would call upon him to withdraw


his objection to the Jury's recommendation. And if he refused .... he should
see what he should see.

At eight o'clock in the morning he was walking down the quay in the
calm sunshine, looking at the activities of the harbour, and nodding
cheerfully to the fishermen as he passed. He was on his way to Government
House, and his conscience, with which he had wrestled so long, was
triumphant and erect.

Then came a shock.

He was crossing the stone bridge that leads up to the town when he saw
the Governor's blue landau coming down in the direction of the railway
station. It was open. Fenella was sitting in it.

Stowell was certain she saw him. But she only coloured up to the eyes
and dropped her head. At the next instant her carriage had crossed in front
of him and swept into the station-yard.

Something surged in his throat; something blinded his eyes. But after a
moment he threw up his head and walked firmly forward.

"Wait! Only wait! We'll see!"

CHAPTER THIRTY-THREE
THE HEART OF A WOMAN

Meanwhile Fenella had been going through her own temptation. On the
night after the trial, having bathed her swollen eyes, she went down to
dinner. Her father looked searchingly at her for a moment, and, as soon as
they were alone, he said,

"Was it Stowell I saw driving towards the mountain road as I came up?"

"Perhaps it was," said Fenella.

"Then why didn't he stay to dinner?"


"Because .... I told him to go."

"Why?"

Fenella gulped down the lump that was rising in her throat and said,

"I have been deceived in him. He is not the man I supposed him to be."

"Don't be a fool, my dear. I understand what you mean. It is his conduct


as a man, not as a Judge you are thinking of. But if every woman in the
world thought she had a right to make a scrutiny into her husband's life
before she married him there would be a fine lot of marriages, wouldn't
there?"

Crude and even coarse as Fenella thought her father's moral philosophy,
she found her self-righteousness shaken by it. Perhaps she had been unfair
to Stowell. But why didn't he come and plead his own cause? She couldn't
talk to her father, but if Victor came and told his own story....

Victor did not come. For two days her pride fought with her love and she
thought herself the unhappiest woman in the world. Then to escape from the
pains of self-reproach she conceived the idea of a fierce revenge upon
Stowell. She would devote herself to his victim! Yes, she would make it her
duty to lighten the lot of the poor creature he had ruined and deserted.

After a struggle, and many shameful tears, she went back to Castle
Rushen, little knowing what a scorching flame she was to pass through.

By this time Bessie was feeling no bitterness against Stowell. The jailer
had told her that the Deemster could not have acted otherwise. The law
compelled him to condemn her. But he had told the Jury to recommend her
to mercy, and now he would be writing to the King to ask him to let her off.

"Aw, he's good, miss—he's real good for all."

"Do you say that, Bessie? After he has betrayed you?" said Fenella,

"Betrayed? I wouldn't say that, miss."


"But he .... he took you to his rooms?"

"What else could he do, miss? All the inns were shut and it was raining,
and I had nothing in my pocket."

"But .... having taken advantage of your homelessness and poverty, he


afterwards cast you off?"

A mysterious wave of injured vanity struggled with Bessie's shame and


she said,

"'Deed he didn't, then. He wanted to marry me."

"Marry you .... did you say marry...."

"Yes, he did, and that was why he sent me to school."

"But afterwards .... afterwards he changed his mind and turned you off
.... I mean turned you over to somebody else?"

"'Deed no," said Bessie, with her chin raised. "It was me that gave him
up after I found I was fonder of Alick."

Breathing hard, scarcely able to speak, with the hot blood rushing to her
cheeks, Fenella compelled herself to go on.

"Did he know then that you...."

"No, miss, and neither did I, nor Alick, nor anybody."

"And when .... when was it that you went...."

"To his rooms in Ramsey? The first Saturday in August, miss."

Fenella went home, happy, miserable, tingling with shame and yet
thrilling with love also. Stowell's victim had brought her heart back to him.

It was just because he had loved her more than he had loved that girl in
prison that the worst had happened. It was just because she herself had
persuaded, constrained and almost compelled him that he had sat on the
case, not fully knowing what was to be revealed by it.

This lasted her half-way home in the train, and then her wounded pride
rose again. After all Victor had been faithless to the love with which she had
inspired him. If a man loved a woman it was his duty to keep himself pure
for her. Victor had not done so, therefore she would never forgive him—
never!

The Governor's carriage met her at the Douglas station, and when
(wiping the scorching tears from her eyes) she reached Government House,
she found another carriage standing by the porch.

"Miss Janet Curphey is here to see you, miss," said the maid.

II

From the day of the trial, when Victor had returned home with a white
face and said, "It doesn't matter now," Janet had known what had occurred.

That Collister girl had corrupted Victor. She had always feared it would
be so since "Auntie Kitty" had whispered over her counter that that
"forward thing" of Liza Corteen's was boasting that Mr. Stowell had been
"sooreying" with her in the glen. And now she had brought him under the
very shadow of shame itself, just when life looked so bright and joyful.

Then came the insular newspaper with an account of Fenella's outburst at


the trial. That was the cruellest blow of all. She had loved Fenella, and had
always thought there would be nothing so sweet as to spread her wedding-
bed for her, but now that she had taken sides against Victor and publicly
denounced him, Janet's blood boiled. She would go up to Government
House and give Fenella a piece of her mind. Why shouldn't she?

It was a dull afternoon when she set off for Douglas, and as she drove
along the coast road she rehearsed to herself the sharp things she was going
to say.

But when Fenella came into the drawing-room, looking so pale as to be


scarcely recognisable as the radiant girl she used to be, and kissed her and
sat by her side, Janet could scarcely say anything.

At length (Miss Green, who had been sitting at tea with her, having
gone) Janet braced herself, and said, not without a tremor,

"I've come about Victor."

"Then he has told you?" said Fenella.

"'Deed he hasn't, and you needn't either, because I know."

Fenella drew her hand away and dropped her head.

"I don't say he hasn't done wrong," said Janet, "but you seem to think
he's the only one who is to blame."

"Oh no! I see now that the girl in Castle Rushen...."

"The girl? I'm not thinking about the girl. Of course she is to blame. But
is there nobody else to blame also?"

"Who else?"

"Yourself."

"Janet!"

"Oh, I'm telling you the truth, dear. That's what I've come for."

"But it all happened before I returned to the Island."

"That's why. If you hadn't stayed away so long it wouldn't have


happened at all."
Then up from the sweet and sorrowful places of Janet's memory came
the story of Stowell's love for Fenella—how he had worked for her and
waited for her through all his long years as a student-at-law.

"It's me to know, my dear. He used to come home every week-end, and


his poor father thought it was to see him, but I knew better. 'Any fresh
news?' he would say, and I knew what news he wanted. When your photo
came he held it under the lamp and said, 'Don't you think she's like my
mother, Janet—just a little like?' And I told him yes, and that was to say you
were like the loveliest woman that ever walked the world—in this island
anyway."

Fenella was struggling to control herself.

"Poor boy, how he worked and worked for you! Jacob never worked
harder or waited longer for Rachel. And what was his reward? You signed
on at your ridiculous Settlement for seven years and sent word you would
never marry. I had it from Catharine Green and it was a sorrowful woman I
was to break the news to him. He looked at me with his mother's eyes, and
it was fit enough to break my heart to see how he cried with his face on the
pillow. But it was with his father's eyes he rose and said, 'It shall never
happen again, mother.' He called me mother too, God bless him!"

Fenella was smothering her mouth in her handkerchief.

"If he went wrong after that, was it any wonder? Young men are young
men, and the Lord won't be too hard on them for being what He has made
them. Some people seem to think when trouble comes between a young
man and a young woman that the young woman is the only one to be pitied.
Well, I'm a woman and I don't. And when a young man has been cut off
from the love that would have kept him right and the heavens have gone
dark on him...."

"But I loved him all the time, Janet."

"Then why didn't you come back, instead of leaving him to the mercy of
these good-looking young vixens who will run any risks with a young man
if they can only get him to marry them?"
Fenella's eyes were down again.

"But that's not all. Not content with deserting him for so many years, you
must try to disgrace him also."

"Janet!"

"Oh, I saw what you said at the trial."

"But nobody knows whom I...."

"Don't they indeed! The men may not—most of them are so stupid. They
may even think you meant somebody else. But you can't deceive the women
like that. And then he knew that you intended it for him. Just when you
were about to become his wife, too, and you were the only woman in the
world to him!"

"I was so shocked. I thought he wasn't the man I had taken him for."

"Perhaps he wasn't, perhaps he was, but thousands of women have lost


faith in their men and clung to them for all that, and they're the salt of the
earth, I say. I'm only an old maid myself, but to stand up for your husband,
right or wrong, that's what I call being a wife, if you ask me."

Fenella could bear up no longer. She flung her arms about Janet's neck
and buried her face in her breast.

The darkness was gathering before they broke from their embrace and
then it was time for Janet to smooth out her silvery hair and go. Fenella saw
her to the carriage and whispered as she kissed her,

"Tell him to come back to me."

And then Janet went home with shining eyes.

III
Day after day Fenella waited at home for Victor, denying herself to
everybody else. Every afternoon she dressed herself in some gown he had
said he liked her in. She dressed her hair, too, in the way he liked best. But
still he did not come.

At length she determined to write to him. Writing was a terrible ordeal.


Her pride fought with her love and she could never satisfy herself with her
letters. First it was—

"DEAR VICTOR,—Don't you really think you've stayed away


long enough? Remember your 'Manx ones'—especially your lovely
and beloved Manx women—won't they be talking?"

But no, that was too much like threatening him, so she began again—

"DARLING,—Did you really think I meant all I said that day?


Don't you know a woman better than that? I suppose you think I am
very hard-hearted and can never forgive, but...."

No, that was wrong, too.

"VICTOR,—Don't you think I have been punished enough? It


has been very hard for me, yet I love you still...."

But the trembling of her handwriting betrayed the emotion she wished to
conceal. At last, after a long day of solitude and abandonment, two little
lines—

"Vic,—I am so lonely. Come to me. Your broken-hearted—


FENELLA."
But all her letters, with their cries and supplications, were torn up and
thrown into the fire.

Why did he stay away? Did he expect her to bridge all the gulf between
them? At length she thought he must be ill. The idea that he could be
suffering (for her sake perhaps) swept down all her pride, and she
determined to go to him.

But just as she was setting out for Ballamoar somebody brought word
that Stowell was staying at Fort Anne. That quenched her humility. So near,
yet never coming to see her! Oh, very well! Very well!

For two days she felt crushed and abased. Then she heard that Stowell
was constantly to be seen at the Law Library, and that brought a memory
and an explanation. She remembered that she had said (in that wild moment
when she didn't know what she was saying) that she would never forgive
him while the girl Bessie lay in prison.

That was it! He was finding a solid legal ground on which the prisoner
could be liberated, and when he had convinced the law officers of the
Crown that this was a proper case for the exercise of mercy, he would come
up to her and say, "Bessie Collister is free!—the barrier between us is
broken down."

For a full day after that her heart was at ease. Nay more, she was almost
happy, for hidden away in some secret place of semi-consciousness was the
thought that the measure of Stowell's efforts for Bessie Collister was the
meter of his love for herself.

At length her impatience got the better of her tranquillity and she
became eager to know what was going on. There was only one person who
could tell her that—her father.

Coming down to breakfast on the sunny morning after the storm, she
saw, among the letters by the Governor's plate, a large envelope
superscribed, "HOME SECRETARY." When her father had opened it she
said, as if casually,
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookfinal.com

You might also like