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

Jtreg failed if the JFrame#setSize method is used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P2 P2
    • None
    • 7
    • client-libs
    • None
    • generic
    • generic

      The following simple jtreg test is failed:
      ------------------------------
      /* @test
         @bug 6593649
         @summary Word wrap does not work in JTextArea: long lines are not wrapped
         @author Lillian Angel
         @run main Test6593649
      */
      import javax.swing.*;

      public class Test6593649 {
          public static void main(String[] args) throws Exception {
              SwingUtilities.invokeAndWait(new Runnable() {
                  public void run() {
                      final JFrame frame = new JFrame();

                      frame.setSize(200, 100);

                      frame.setVisible(true);
                  }
              });
          }
      }
      ------------------------------

      At the same time if you remove the "frame.setSize(200, 100);" line it passes. Actually it looks like a regression.
      I noteced also that replacing JFrame by Frame makes the test workable.
      Below is a stacktrace:

      java.lang.IllegalStateException: Buffers have not been created
      at sun.awt.windows.WComponentPeer.getBackBuffer(WComponentPeer.java:965)
      at java.awt.Component$FlipBufferStrategy.getBackBuffer(Component.java:3971)
      at java.awt.Component$FlipBufferStrategy.updateInternalBuffers(Component.java:3956)
      at java.awt.Component$FlipBufferStrategy.createBuffers(Component.java:3947)
      at java.awt.Component$FlipBufferStrategy.<init>(Component.java:3886)
      at java.awt.Component$FlipSubRegionBufferStrategy.<init>(Component.java:4409)
      at java.awt.Component.createBufferStrategy(Component.java:3768)
      at java.awt.Window.createBufferStrategy(Window.java:3272)
      at javax.swing.BufferStrategyPaintManager$BufferInfo.createBufferStrategy(BufferStrategyPaintManager.java:863)
      at javax.swing.BufferStrategyPaintManager$BufferInfo.createBufferStrategy(BufferStrategyPaintManager.java:814)
      at javax.swing.BufferStrategyPaintManager$BufferInfo.getBufferStrategy(BufferStrategyPaintManager.java:747)
      at javax.swing.BufferStrategyPaintManager.prepare(BufferStrategyPaintManager.java:523)
      at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:281)
      at javax.swing.RepaintManager.paint(RepaintManager.java:1206)
      at javax.swing.JComponent.paint(JComponent.java:1042)
      at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
      at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78)
      at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115)
      at java.awt.Container.paint(Container.java:1942)
      at java.awt.Window.paint(Window.java:3783)
      at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:781)
      at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:728)
      at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:677)
      at javax.swing.RepaintManager.access$700(RepaintManager.java:59)
      at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1621)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:649)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:255)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:170)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:160)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:155)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:136)

            Unassigned Unassigned
            rupashka Pavel Porvatov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: