6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 /* @test
27 @bug 4529206
28 @summary JToolBar - setFloating does not work correctly
29 @author Konstantin Eremin
30 @run main bug4529206
31 */
32
33 import javax.swing.*;
34 import java.awt.*;
35 import java.awt.event.ActionEvent;
36 import java.awt.event.ActionListener;
37
38 public class bug4529206 extends JFrame {
39 static JFrame frame;
40 static JToolBar jToolBar1;
41 public bug4529206() {
42 setDefaultCloseOperation(EXIT_ON_CLOSE);
43 JPanel jPanFrame = (JPanel) this.getContentPane();
44 jPanFrame.setLayout(new BorderLayout());
45 this.setSize(new Dimension(200, 100));
46 this.setLocation(125, 75);
47 this.setTitle("Test Floating Toolbar");
48 jToolBar1 = new JToolBar();
49 JButton jButton1 = new JButton("Float");
50 jPanFrame.add(jToolBar1, BorderLayout.NORTH);
51 JTextField tf = new JTextField("click here");
|
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 /*
27 * @test
28 * @key headful
29 * @bug 4529206
30 * @summary JToolBar - setFloating does not work correctly
31 * @author Konstantin Eremin
32 * @run main bug4529206
33 */
34
35 import javax.swing.*;
36 import java.awt.*;
37 import java.awt.event.ActionEvent;
38 import java.awt.event.ActionListener;
39
40 public class bug4529206 extends JFrame {
41 static JFrame frame;
42 static JToolBar jToolBar1;
43 public bug4529206() {
44 setDefaultCloseOperation(EXIT_ON_CLOSE);
45 JPanel jPanFrame = (JPanel) this.getContentPane();
46 jPanFrame.setLayout(new BorderLayout());
47 this.setSize(new Dimension(200, 100));
48 this.setLocation(125, 75);
49 this.setTitle("Test Floating Toolbar");
50 jToolBar1 = new JToolBar();
51 JButton jButton1 = new JButton("Float");
52 jPanFrame.add(jToolBar1, BorderLayout.NORTH);
53 JTextField tf = new JTextField("click here");
|