• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

calling info

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
DANIEL GRESHAM
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It does NOT return the variable val, it returns value of val.
 
I don't get it. A whale wearing overalls? How does that even work? It's like a tiny ad wearing overalls.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic