Test4243289.java revision 2362
4639N/A/*
4639N/A * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
4639N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4639N/A *
4639N/A * This code is free software; you can redistribute it and/or modify it
4639N/A * under the terms of the GNU General Public License version 2 only, as
4639N/A * published by the Free Software Foundation.
4639N/A *
4639N/A * This code is distributed in the hope that it will be useful, but WITHOUT
4639N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4639N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4639N/A * version 2 for more details (a copy is included in the LICENSE file that
4639N/A * accompanied this code).
4639N/A *
4639N/A * You should have received a copy of the GNU General Public License version
4639N/A * 2 along with this work; if not, write to the Free Software Foundation,
4639N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4639N/A *
4639N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4639N/A * or visit www.oracle.com if you need additional information or have any
4639N/A * questions.
4639N/A */
4639N/A
4639N/A/*
4639N/A * @test
4639N/A * @bug 4243289
4639N/A * @summary Tests that TitledBorder do not draw line through its caption
4639N/A * @author Peter Zhelezniakov
4639N/A * @run applet/manual=yesno Test4243289.html
4639N/A */
4639N/A
4639N/Aimport java.awt.Font;
4639N/Aimport javax.swing.BorderFactory;
4639N/Aimport javax.swing.JApplet;
4639N/Aimport javax.swing.JPanel;
4639N/Aimport javax.swing.border.TitledBorder;
4639N/A
4639N/Apublic class Test4243289 extends JApplet {
4639N/A public void init() {
4639N/A Font font = new Font("Dialog", Font.PLAIN, 12); // NON-NLS: the font name
4639N/A TitledBorder border = BorderFactory.createTitledBorder(
4639N/A BorderFactory.createEtchedBorder(),
4639N/A "Panel Title", // NON-NLS: the title of the border
4639N/A TitledBorder.DEFAULT_JUSTIFICATION,
4639N/A TitledBorder.DEFAULT_POSITION,
4639N/A font);
4639N/A
4639N/A JPanel panel = new JPanel();
4639N/A panel.setBorder(border);
4639N/A getContentPane().add(panel);
4639N/A }
4639N/A}
4639N/A