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

ctrl F1 doesn't invoke tooltip on non Editable JCombobox

    XMLWordPrintable

    Details

    • Subcomponent:
    • Understanding:
      Fix Understood
    • CPU:
      generic, x86
    • OS:
      generic, windows_2000

      Description



      Name: gm110360 Date: 06/16/2004


      FULL PRODUCT VERSION :


      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows 2000 [Version 5.00.2195]

      A DESCRIPTION OF THE PROBLEM :
      With focus on JCombobox if we enter ctrl F1, it doesn't invoke tooltip on non Editable JCombobox. for editable comboboxes, it works.


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      /*
       *
       */
      import java.awt.*;
      import java.awt.event.*;
      import javax.swing.*;
      import java.net.URL;

      public class TestCombo{


          JPanel selectPanel;

          JComboBox phaseChoices = null;
          

          public TestCombo() {
              //Create the phase selection and display panels.
              selectPanel = new JPanel();
               //Create a combo box with lunar phase choices.
              String[] phases = { "New", "Waxing Crescent", "First Quarter",
                                  "Waxing Gibbous", "Full", "Waning Gibbous",
                                  "Third Quarter", "Waning Crescent" };
                                  
              phaseChoices = new JComboBox(phases);
              phaseChoices.setToolTipText("phaseChoices");
         // phaseChoices.setEditable(true);
              phaseChoices.setSelectedIndex(1);

              //Add a border around the select panel.
              selectPanel.setBorder(BorderFactory.createCompoundBorder(
                  BorderFactory.createTitledBorder("Select Phase"),
                  BorderFactory.createEmptyBorder(5,5,5,5)));

           
              //Add moon phases combo box to select panel .
               selectPanel.add(phaseChoices);

          }
          /**
           * Create the GUI and show it. For thread safety,
           * this method should be invoked from the
           * event-dispatching thread.
           */
          private static void createAndShowGUI() {
              JFrame.setDefaultLookAndFeelDecorated(true);

              //Create a new instance of LunarPhases.
              TestCombo phases = new TestCombo();

              //Create and set up the window.
              JFrame lunarPhasesFrame = new JFrame("Lunar Phases");
              lunarPhasesFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              lunarPhasesFrame.setContentPane(phases.selectPanel);

              //Display the window.
              lunarPhasesFrame.pack();
              lunarPhasesFrame.setVisible(true);
          }

          public static void main(String[] args) {
              //Schedule a job for the event-dispatching thread:
              //creating and showing this application's GUI.
              javax.swing.SwingUtilities.invokeLater(new Runnable() {
                  public void run() {
                      createAndShowGUI();
                  }
              });
          }
      }


      ---------- END SOURCE ----------
      (Incident Review ID: 280157)
      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Imported:
              Indexed: