wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes calling info Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "calling info" Watch "calling info" New topic
Author

calling info

DANIEL GRESHAM
Greenhorn

Joined: Feb 09, 2005
Posts: 21
try not to laugh too hard, but I am creating my first program that utilizes a second class the program will accept one value and return it to memory[]
heres the code

now for my question, how do i call this class to open when a method is activated and retrieve the data(val)?
heres what i think i need to do please tell me if I'm wrong


thanks in advance,
Danny
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
It looks like you are on the right track. The main thing your missing is that you need to display the dialog:

As you are learning Java, you should become familiar with the API documentation for the version you are using. These docs provide information about all the classes and methods that are available from the standard API. For example, if you look at the docs for JDialog, you will quickly see some links for a tutorial about how to use a dialog box. If you scroll further down, you will see the methods provided by the JDialog class. In this particular case, your MyDialog class inherits all of these methods, including show() which will display the dialog. I'll leave it to you to figure out how to hide the dialog when you are done with it.

Layne


Java API Documentation
The Java Tutorial
DANIEL GRESHAM
Greenhorn

Joined: Feb 09, 2005
Posts: 21
when calling the GetValue() method, this returns the variable val, now to use this in a new class, do i have to assign it to a new variable or just use val from teh MyDialog class?
Surasak Leenapongpanit
Ranch Hand

Joined: May 10, 2002
Posts: 341
It does NOT return the variable val, it returns value of val.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: calling info
 
Similar Threads
JFrame
calling and no ringing apparently
input errors in JDialogs
Trials and tribulations, trys and catches
StringTokenizer Class