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

showInputDialog incorrect panel sizing when message argument > 1 line

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.3.0
    • client-libs



      Name: krT82822 Date: 11/02/99


      10/29/99 eval1127@eng -- see also 4248668, 4222531 (which may have already fixed the problem?)

      description : java version "1.3beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3beta-0)
      Java(TM) HotSpot Client VM (build 1.3beta-0, mixed mode)
      If you run this code on Windows NT you will see the buttons are partially
      hidden by the dialog panel:
      -----

      import javax.swing.*;

      class TestDialog extends JFrame
      {
         TestDialog()
         {
            String prompt = "Prompt";
            String inputText = "input";
            String title = "title";
            String pref=
             JOptionPane.showInputDialog(this.getContentPane(), prompt + "\n" +
                inputText, title,JOptionPane.QUESTION_MESSAGE);

            Box b = Box.createVerticalBox();
            b.add(new JLabel(prompt));
            b.add(new JLabel(inputText));
            pref=
             JOptionPane.showInputDialog(this.getContentPane(), b,
                title,JOptionPane.QUESTION_MESSAGE);

         }


         public static void main(String[] p)
         {
            new TestDialog();
            System.exit(0);
         }
      }
      (Review ID: 97203)
      ======================================================================

            amfowler Anne Fowler (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: