Results 1 to 3 of 3
- 03-19-2010, 05:12 PM #1
JOptionPane.showMessageDialog(null,"Etc Etc"); - What does null actually do?
Been using JOptionPane.showMessageDialog(null,"Etc Etc"); for a while now, but it was never explained to me what "null" does
I had a read through the API definition but thats making it more confusing.
Found here:
JOptionPane (Java 2 Platform SE v1.4.2)
Can anyone break it down so that its easier to understand.
Thanks Guys
Mark
- 03-19-2010, 05:22 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,385
- Blog Entries
- 7
- Rep Power
- 17
That first parameter is the JFrame on top of which (read: in front of which) the JOptionPane should be shown; if you don't supply one (the parameter value is null) the JOptionPane creates an invisible JFrame on top of which it is displayed.
kind regards,
Jos
- 03-19-2010, 05:30 PM #3
Similar Threads
-
How to "allow null" in a very simple script?
By Mattedatten in forum New To JavaReplies: 7Last Post: 12-04-2010, 11:09 PM -
jList Issues - getSelectedValue() Keeps returning "null"
By MoobKeeng in forum New To JavaReplies: 0Last Post: 07-28-2009, 06:45 PM -
the dollar sign "$", prints like any other normal char in java like "a" or "*" ?
By lse123 in forum New To JavaReplies: 1Last Post: 10-20-2008, 07:35 AM -
Why does it still have it as "Null"?
By cart1443 in forum New To JavaReplies: 1Last Post: 02-07-2008, 05:56 AM -
Name Coming Up As "null"
By sylo18 in forum New To JavaReplies: 8Last Post: 10-30-2007, 10:31 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks