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.
JOptionPane (Java 2 Platform SE v1.4.2)
Can anyone break it down so that its easier to understand.
- 03-19-2010, 05:22 PM #2
- Join Date
- Sep 2008
- Voorschoten, the Netherlands
- Blog Entries
- Rep Power
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.
- 03-19-2010, 05:30 PM #3
- By Mattedatten in forum New To JavaReplies: 7Last Post: 12-04-2010, 11:09 PM
- By MoobKeeng in forum New To JavaReplies: 0Last Post: 07-28-2009, 06:45 PM
- By lse123 in forum New To JavaReplies: 1Last Post: 10-20-2008, 07:35 AM
- By cart1443 in forum New To JavaReplies: 1Last Post: 02-07-2008, 05:56 AM
- By sylo18 in forum New To JavaReplies: 8Last Post: 10-30-2007, 10:31 PM