This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 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: 24193

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.
I agree. Here's the link:
subject: OkCancelDialog
It's not a secret anymore!