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

Adding double-buffer JPanel into a Box causes drawing problem

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.1.5, 1.2.0
    • Fix Version/s: 1.0.2
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      1.0.2
    • CPU:
      x86, sparc
    • OS:
      solaris_2.4, windows_nt

      Description

      Adding double-buffered JPanel into a Box causes drawing problem. Run the following code to reproduce:
      ('button in a panel' was drawed 2 times in different location)

      import java.awt.*;
      import com.sun.java.swing.*;

      public class BoxTest
      {
          public static void main(String[] args){
              JFrame frame = new JFrame();

              Box box = new Box(BoxLayout.Y_AXIS);
              box.add(new JLabel("I am a label"));
              box.add(new JButton("I am a button"));

              JPanel panel = new JPanel();
              panel.add(new JButton("button in a panel"));

              box.add(panel);
              frame.getContentPane().add(box);
              frame.pack();
              frame.setVisible(true);
          }

      }
      bae-chul.kim@Eng 1998-03-09

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              svioletsunw Scott Violet (Inactive)
              Reporter:
              bkimsunw Bae-chul Kim (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: