mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-15 08:17:12 -06:00
OptionPane: do not make child components, which are derived from JPanel, non-opaque (issue #349)
This commit is contained in:
@@ -28,6 +28,8 @@ FlatLaf Change Log
|
|||||||
components by:
|
components by:
|
||||||
- `2px` at `1.75x` in **Light** and **Dark** themes
|
- `2px` at `1.75x` in **Light** and **Dark** themes
|
||||||
- `2px` at `1.25x` and `2.25x` in **IntelliJ** and **Darcula** themes
|
- `2px` at `1.25x` and `2.25x` in **IntelliJ** and **Darcula** themes
|
||||||
|
- OptionPane: Do not make child components, which are derived from `JPanel`,
|
||||||
|
non-opaque. (issue #349)
|
||||||
|
|
||||||
|
|
||||||
## 1.3
|
## 1.3
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ public class FlatOptionPaneUI
|
|||||||
|
|
||||||
private void updateChildPanels( Container c ) {
|
private void updateChildPanels( Container c ) {
|
||||||
for( Component child : c.getComponents() ) {
|
for( Component child : c.getComponents() ) {
|
||||||
if( child instanceof JPanel ) {
|
if( child.getClass() == JPanel.class ) {
|
||||||
JPanel panel = (JPanel)child;
|
JPanel panel = (JPanel)child;
|
||||||
|
|
||||||
// make sub-panel non-opaque for OptionPane.background
|
// make sub-panel non-opaque for OptionPane.background
|
||||||
@@ -177,11 +177,10 @@ public class FlatOptionPaneUI
|
|||||||
panel.setBorder( new NonUIResourceBorder( border ) );
|
panel.setBorder( new NonUIResourceBorder( border ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( child instanceof Container ) {
|
if( child instanceof Container )
|
||||||
updateChildPanels( (Container) child );
|
updateChildPanels( (Container) child );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private Component findByName( Container c, String name ) {
|
private Component findByName( Container c, String name ) {
|
||||||
for( Component child : c.getComponents() ) {
|
for( Component child : c.getComponents() ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user