Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4789550

RFE: Need showMessageDialog with only one parameter in javax.swing.JOptionPane

XMLWordPrintable

    • Fix Understood
    • generic, x86
    • generic, windows_98

      Name: jk109818 Date: 12/05/2002


      FULL PRODUCT VERSION :
      J2SE 1.4.1_01

      OPERATING SYSTEM VERSION :
      ANY VERSION


      A DESCRIPTION OF THE PROBLEM :
      Please overload showMessageDialog in javax.swing.JOptionPane
      to be able to use this method with only one parameter when
      no frame is open.
      This would allow to write :
      javax.swing.JOptionPane.showMessageDialog ("Hello");
      instead of :
      javax.swing.JOptionPane.showMessageDialog (null, "Hello");
      avoiding the null default parameter.

      This RFE aims to help Java teachers to use the
      showMessageDialog method instead of the classic
      System.out.println method for the following reasons :
      1. java.lang.System.out.println doesn't display correctly
      Unicode international characters in DOS command windows
      2. javax.swing.JOptionPane.showMessageDialog is longer to
      write but is more simple to explain (you can just say "call
      the class method showMessageDialog of
      javax.swing.JOptionPane class"). But the null parameter is
      often forgotten by students and is difficult to explain to
      beginners.
      3. javax.swing.JOptionPane.showMessageDialog is really
      helpful to display all kind of things.
      4. javax.swing.JOptionPane.showInputDialog exists with one
      parameter so why not doing it with showMessageDialog ?
      5. It will take 1 minute to any Sun developer to program it...

      REPRODUCIBILITY :
      This bug can be reproduced always.
      (Review ID: 178816)
      ======================================================================

            Unassigned Unassigned
            jkimsunw Jeffrey Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: