Cross Reference: bug6726866.java
xref
: /
openjdk7
/
jdk
/
test
/
javax
/
swing
/
JInternalFrame
/
6726866
/
bug6726866.java
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
bug6726866.java revision 1222
0
N/A
/* @test
1879
N/A
@bug 6726866
0
N/A
@summary Repainting artifacts when resizing or dragging JInternalFrames in non-opaque toplevel
0
N/A
@author Alexander Potochkin
0
N/A
@run
applet
/
manual
=yesno
bug6726866.html
0
N/A
*/
0
N/A
0
N/A
import
javax
.
swing
.*;
0
N/A
import
java
.
awt
.*;
0
N/A
import
java
.
lang
.
reflect
.
Method
;
0
N/A
0
N/A
public
class
bug6726866
extends
JApplet
{
0
N/A
0
N/A
public
void
init
() {
0
N/A
JFrame
frame
=
new
JFrame
(
"bug6726866"
);
0
N/A
frame
.
setUndecorated
(
true
);
0
N/A
setWindowNonOpaque
(
frame
);
0
N/A
1472
N/A
JDesktopPane
desktop
=
new
JDesktopPane
();
1472
N/A
desktop
.
setBackground
(
Color
.
GREEN
);
1472
N/A
JInternalFrame
iFrame
=
new
JInternalFrame
(
"Test"
,
true
,
true
,
true
,
true
);
0
N/A
iFrame
.
add
(
new
JLabel
(
"internal Frame"
));
0
N/A
iFrame
.
setBounds
(
10
,
10
,
300
,
200
);
0
N/A
iFrame
.
setVisible
(
true
);
1879
N/A
desktop
.
add
(
iFrame
);
1879
N/A
frame
.
add
(
desktop
);
1879
N/A
1879
N/A
frame
.
setDefaultCloseOperation
(
JFrame
.
EXIT_ON_CLOSE
);
1879
N/A
frame
.
setSize
(
400
,
400
);
1879
N/A
frame
.
setVisible
(
true
);
3767
N/A
frame
.
toFront
();
1879
N/A
}
1879
N/A
1879
N/A
private
void
setWindowNonOpaque
(
Window
w) {
0
N/A
try
{
0
N/A
Class
<?> c =
Class
.
forName
(
"com.sun.awt.AWTUtilities"
);
0
N/A
Method
m = c.
getMethod
(
"setWindowOpaque"
,
Window
.
class
,
boolean
.
class
);
0
N/A
m.
invoke
(
null
, w,
false
);
0
N/A
}
0
N/A
catch
(
Exception
e) {
3767
N/A
e.
printStackTrace
();
3842
N/A
}
3842
N/A
}
3842
N/A
}
3842
N/A