equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 |
24 |
25 import java.awt.*; |
25 import java.awt.*; |
26 import java.awt.peer.ButtonPeer; |
|
27 |
26 |
28 /** |
27 /** |
29 * @test |
28 * @test |
30 * @bug 7090424 |
29 * @bug 7090424 |
31 * @author Sergey Bylokhov |
30 * @author Sergey Bylokhov |
64 |
63 |
65 void test() { |
64 void test() { |
66 setLabel(""); |
65 setLabel(""); |
67 setLabel(null); |
66 setLabel(null); |
68 setLabel(getLabel()); |
67 setLabel(getLabel()); |
69 ((ButtonPeer) getPeer()).setLabel(""); |
|
70 ((ButtonPeer) getPeer()).setLabel(null); |
|
71 ((ButtonPeer) getPeer()).setLabel(getLabel()); |
|
72 |
68 |
73 setFont(null); |
69 setFont(null); |
74 setFont(getFont()); |
70 setFont(getFont()); |
75 getPeer().setFont(getFont()); |
|
76 |
71 |
77 setBackground(null); |
72 setBackground(null); |
78 setBackground(getBackground()); |
73 setBackground(getBackground()); |
79 getPeer().setBackground(getBackground()); |
|
80 |
74 |
81 setForeground(null); |
75 setForeground(null); |
82 setForeground(getForeground()); |
76 setForeground(getForeground()); |
83 getPeer().setForeground(getForeground()); |
|
84 |
77 |
85 setEnabled(isEnabled()); |
78 setEnabled(isEnabled()); |
86 getPeer().setEnabled(isEnabled()); |
|
87 } |
79 } |
88 } |
80 } |