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

Flashing problem when call JSplitPane.setRightComponent()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1.6, 1.2.0
    • client-libs
    • generic, x86
    • generic, windows_nt



      Name: rk38400 Date: 05/13/98


      I have a JDialog(aDialog) which consist of a
      JSplitPane(aSplitPanel) and two Jbuttons.

      With the aSplitPanel, I add a JList(aListPanel) in the
      left of the SplitPanel, and a JPanel(aChoicePanel)
      in the right of the SplitPanel.

      ...
      String[] data = { "one", "tw", "three" };
      JList aList = new JList(data);
      JPanel panel1 = new Jpanel();
      JPanel panel2 = new JPanel();
      JPanel panel3 = new JPanel();
      ... // setup the panels

      JSplitPane aSplitPane = new JSplitPane(new JSplitPane( JSplitPane.HORIZONTAL_SPLIT, true, aList, panel1 );
      ...
      // now, everytime the list selection changed
      // I will call setRightComponent() from JSplitPane
      // to get the different panel I want to show
      // like this
      int selectedInt = aList.getSelectedIndex();
      if (selectedInt == 0)
      {
         aSplitPanel.setRightComponent(panel1);
      }
      else if (selectedInt == 1)
      {
         aSplitPanel.setRightComponet(panel2);
      }
      else if (selectedInt == 2)
      {
         aSplitPanel.setRightComponent(panel3);
      }
      else
      ...

      Everytime the setRightComponent() is called, the whole
      Screen get a weird flash, and shows a white rectangle
      box at the upper left corner of the dialog.

      Just a note, the above code is just an example of how to
      reproduce the bug. It doesn't compile.

      Thank you! :Þ
      (Review ID: 30316)
      ======================================================================

            rkarsunw Ralph Kar (Inactive)
            rkarsunw Ralph Kar (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: