File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes What is the logic behind calls like JOptionPane.method() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "What is the logic behind calls like JOptionPane.method()" Watch "What is the logic behind calls like JOptionPane.method()" New topic

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

Raghavan Chockalingam
Ranch Hand

Joined: Dec 20, 2005
Posts: 77
Forgive me on the is the problem...
1. I need a clarification on what is the logic behind making calls like
We do not create objects for these variables and we call the methods of the classes 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

Joined: Jul 15, 2003
Posts: 1078
They are static methods.
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
And regarding your second question, you should read about "anonymous inner classes".

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Nick George
Ranch Hand

Joined: Apr 04, 2004
Posts: 815
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've heard it takes forever to grow a woman from the ground
I agree. Here's the link:
subject: What is the logic behind calls like JOptionPane.method()
Similar Threads
CVS Plugin For Eclipse some times problematic : Why??
Friendly advice appreciated with a small personal project (Beginner)
Which statements in Java cannot be labelled?
quick question about defining variables
Throw - what's the point??