Commit 043b0a7 Alexey Ushakov
committed Mar 29, 2022
1 parent 2367228 commit 043b0a7 Copy full SHA for 043b0a7
File tree 1 file changed +12
-1
lines changed
src/java.desktop/macosx/classes/sun/lwawt
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2011, 2021 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2011, 2022 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
59
59
import java .awt .peer .WindowPeer ;
60
60
import java .util .List ;
61
61
62
+ import java .util .Objects ;
62
63
import javax .swing .JComponent ;
63
64
64
65
import sun .awt .AWTAccessor ;
@@ -281,6 +282,16 @@ protected void disposeImpl() {
281
282
super .disposeImpl ();
282
283
}
283
284
285
+ @ Override
286
+ public void setBackground (final Color c ) {
287
+ Color oldBg = getBackground ();
288
+ if (Objects .equals (oldBg , c )) {
289
+ return ;
290
+ }
291
+ super .setBackground (c );
292
+ updateOpaque ();
293
+ }
294
+
284
295
@ Override
285
296
protected void setVisibleImpl (final boolean visible ) {
286
297
if (!visible && warningWindow != null ) {
You can’t perform that action at this time.
0 commit comments