This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes OkCancelDialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "OkCancelDialog" Watch "OkCancelDialog" New topic


Nicholas Carrier
Ranch Hand

Joined: Apr 14, 2005
Posts: 78
I'm reading Java After Hourse by Holzner and part of the code in the book that I'm supposed to use is.

textDialog = new OkCancelDialog(this, "Set speed (1-100)", true);

However, I can't find the class to declare this with. I'm looking through the API and cannot find anything that says OkCancelDialog. Anybody have any idea where this is located?

I tried using

OkCancelDialog textDialog;

hoping that that was the class name, unfortunately, that isn't it.

Thanks again for your help.
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24183

There's no class by that name in the standard API. javax.swing.JOptionPane is the obvious substitute. I'm not familiar with that book, but I'm sure if you look more closely you'll find that either the author intends this as a non-compilable hypothetical example, or this is a class they show elsewhere in the book or provide in a utility library that goes with the book.

[Jess in Action][AskingGoodQuestions]
Nicholas Carrier
Ranch Hand

Joined: Apr 14, 2005
Posts: 78
hopefully I'll find it somewhere in the book. At least it wasn't just me going crazy and not being able to find it in the API.

Thanks again.
subject: OkCancelDialog
Similar Threads
Mouse and Key Listeners don't work on JPanel
Help!!! I can't get BMT working with Orion and MS SQL Server
where is net.sf.hibernate.Session?
Retrieving wrong date/time with Timestamp
A conundrum with seting Graphics font size