File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the logic behind calls like JOptionPane.method()

 
Raghavan Chockalingam
Ranch Hand
Posts: 77
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Forgive me on the title...here is the problem...
1. I need a clarification on what is the logic behind making calls like
JOptionPane.showMessageDialog();
Integer.parseInt();
We do not create objects for these variables and we call the methods of the classes directly...how this is possible...are they any special kind of classes???

2. I have not seen this kind of coding in any other language,,,can anyone explain me how this coding construct works???
 
Ken Blair
Ranch Hand
Posts: 1078
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are static methods.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And regarding your second question, you should read about "anonymous inner classes".
 
Nick George
Ranch Hand
Posts: 815
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
to elaborate on 1: The static method creates its own frame, from which it gets input, and then returns that input. You never talk directly to the frame object
[ December 30, 2005: Message edited by: Nick George ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic