jdk/test/java/awt/Graphics2D/DrawString/DrawStrSuper.java
author goetz
Tue, 14 Jun 2016 10:44:59 +0200
changeset 39056 d99e63b6d962
parent 5506 202f599c92aa
permissions -rw-r--r--
8159690: [TESTBUG] Mark headful tests with @key headful. Reviewed-by: simonis, alexsch
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
534
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
     1
/*
39056
d99e63b6d962 8159690: [TESTBUG] Mark headful tests with @key headful.
goetz
parents: 5506
diff changeset
     2
 * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
534
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
     4
 *
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
     7
 * published by the Free Software Foundation.
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
     8
 *
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    13
 * accompanied this code).
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    14
 *
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    18
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 534
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 534
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 534
diff changeset
    21
 * questions.
534
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    22
 */
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    23
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    24
/**
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    25
 * @test
39056
d99e63b6d962 8159690: [TESTBUG] Mark headful tests with @key headful.
goetz
parents: 5506
diff changeset
    26
 * @key headful
534
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    27
 * @bug 6684056
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    28
 * @summary Super-scripted text needs to be positioned the same with
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    29
 *          drawString and TextLayout.
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    30
 */
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    31
import java.awt.*;
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    32
import java.awt.event.*;
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    33
import java.awt.font.*;
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    34
import static java.awt.font.TextAttribute.*;
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    35
import java.awt.geom.AffineTransform;
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    36
import java.awt.image.BufferedImage;
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    37
import java.util.HashMap;
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    38
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    39
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    40
public class DrawStrSuper extends Component {
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    41
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    42
    int angle = 0;
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    43
    static boolean interactive = false;
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    44
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    45
    int wid=400, hgt=400;
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    46
    BufferedImage bi = null;
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    47
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    48
    void paintImage() {
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    49
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    50
        if (bi == null) {
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    51
             bi = new BufferedImage(wid, hgt, BufferedImage.TYPE_INT_RGB);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    52
        }
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    53
        Graphics2D g2d = bi.createGraphics();
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    54
        g2d.setColor(Color.white);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    55
        g2d.fillRect(0, 0, wid, hgt);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    56
        g2d.translate(200, 200);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    57
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    58
        Font fnt = new Font("Arial", Font.PLAIN, 20);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    59
        fnt = fnt.deriveFont(60.0f);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    60
        HashMap attrMap = new HashMap();
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    61
        AffineTransform aff =
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    62
            AffineTransform.getRotateInstance(angle * Math.PI/180.0);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    63
        attrMap.put(SUPERSCRIPT, SUPERSCRIPT_SUPER);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    64
        attrMap.put(TRANSFORM, aff);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    65
        fnt = fnt.deriveFont(attrMap);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    66
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    67
        g2d.setFont(fnt);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    68
        g2d.setColor(Color.yellow);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    69
        TextLayout tl = new TextLayout("Text", fnt,g2d.getFontRenderContext());
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    70
        g2d.fill(tl.getBounds());
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    71
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    72
        g2d.setColor(Color.black);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    73
        g2d.drawLine(-3, 0, 3, 0);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    74
        g2d.drawLine(0, -3, 0, 3);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    75
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    76
        g2d.setColor(Color.blue);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    77
        g2d.drawString("Text", 0, 0);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    78
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    79
        g2d.setColor(Color.red);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    80
        tl.draw(g2d,0f,0f);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    81
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    82
        // Test BI: should be no blue
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    83
        int blue = Color.blue.getRGB();
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    84
        for (int px=0;px<wid;px++) {
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    85
            for (int py=0;py<hgt;py++) {
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    86
                int rgb = bi.getRGB(px, py);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    87
                if (rgb == blue) {
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    88
                    throw new RuntimeException
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    89
                        ("Unexpected color : " + Integer.toHexString(rgb) +
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    90
                         " at x=" + px + " y="+ py);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    91
                }
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    92
            }
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    93
        }
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    94
    }
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    95
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    96
    @Override
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    97
    public void paint(Graphics g) {
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    98
        paintImage();
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
    99
        g.drawImage(bi, 0,0, null);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   100
    }
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   101
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   102
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   103
    static class Runner extends Thread {
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   104
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   105
        DrawStrSuper dss;
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   106
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   107
        Runner(DrawStrSuper dss) {
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   108
            this.dss = dss;
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   109
        }
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   110
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   111
        public void run() {
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   112
            while (true) {
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   113
                if (!interactive && dss.angle > 360) {
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   114
                    return;
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   115
                }
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   116
                try {
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   117
                    Thread.sleep(100);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   118
                } catch (InterruptedException e) {
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   119
                    return;
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   120
                }
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   121
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   122
                dss.angle += 10;
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   123
                dss.repaint();
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   124
            }
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   125
        }
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   126
    }
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   127
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   128
    @Override
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   129
    public Dimension getPreferredSize() {
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   130
        return new Dimension(400, 400);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   131
    }
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   132
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   133
    public static void main(String argv[]) throws InterruptedException {
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   134
        if (argv.length > 0) interactive = true;
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   135
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   136
        Frame f = new Frame("Text bounds test");
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   137
        f.addWindowListener(new WindowAdapter() {
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   138
            @Override
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   139
            public void windowClosing(WindowEvent e) {
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   140
                System.exit(0);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   141
            }
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   142
        });
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   143
        DrawStrSuper dss = new DrawStrSuper();
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   144
        f.add(dss, BorderLayout.CENTER);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   145
        f.pack();
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   146
        f.setLocationRelativeTo(null);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   147
        f.setVisible(true);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   148
        Runner runner = new Runner(dss);
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   149
        runner.start();
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   150
        runner.join();
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   151
    }
be8500bc69b2 6684056: SUPERSCRIPT TextAttribute on font needs to trigger layout.
prr
parents:
diff changeset
   152
}