Results 1 to 5 of 5
  1. #1
    jperson is offline Member
    Join Date
    Jan 2010
    Posts
    61
    Rep Power
    0

    Default some simple question?

    i want to know what's

    System.out (it's class out in package System ?)
    ---------
    JOptionPane.showMessageDialog(null,"message"); (what's first argument null)
    i want an example to use this method but first argument not null?
    ---------

  2. #2
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,429
    Rep Power
    10

    Default

    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  3. #3
    jperson is offline Member
    Join Date
    Jan 2010
    Posts
    61
    Rep Power
    0

    Default

    thank u for help PhHein but
    i can't understand showMessage Dialog()

    i make this simple code

    public class Main {

    public static void main(String[] args) {
    JFrame frame = new JFrame();
    frame.setVisible(true);
    frame.setSize(400, 500);
    JOptionPane.showMessageDialog(null, "test");



    }
    }

    i can't see any changes if my argument is null or frame
    i want some help to understand this argument please ??

  4. #4
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,429
    Rep Power
    10

    Default

    Click the JFrame while the JOptionPane is visible, once with the null parameter and once with frame as the first parameter.
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  5. #5
    jperson is offline Member
    Join Date
    Jan 2010
    Posts
    61
    Rep Power
    0

    Default

    i see JOptionPane inside the JFrame when i use JOptionPane.showMessageDialog(frame, "test");

    i think that's the difference

Similar Threads

  1. Simple Question
    By barusk in forum Networking
    Replies: 13
    Last Post: 03-04-2009, 08:33 PM
  2. A simple List question
    By right2001 in forum New To Java
    Replies: 2
    Last Post: 02-16-2009, 04:37 AM
  3. Simple question about access
    By tortelini in forum New To Java
    Replies: 6
    Last Post: 09-06-2008, 05:41 PM
  4. Simple Method Question
    By Froz3n777 in forum New To Java
    Replies: 2
    Last Post: 02-13-2008, 03:39 AM
  5. Probably a really simple question...
    By ibanez270dx in forum New To Java
    Replies: 0
    Last Post: 11-16-2007, 02:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •