From a7274b023a4221c54b0401223fc135d0929b7f23 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Thu, 27 Dec 2007 09:24:17 +0000 Subject: [PATCH] [ 1855851 ] Propose New Look for Collapseable Field Group - fix border issue when collapsed. --- looks/src/org/compiere/swing/CollapsiblePanel.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/looks/src/org/compiere/swing/CollapsiblePanel.java b/looks/src/org/compiere/swing/CollapsiblePanel.java index fc04877e4d..bdeea7353b 100644 --- a/looks/src/org/compiere/swing/CollapsiblePanel.java +++ b/looks/src/org/compiere/swing/CollapsiblePanel.java @@ -191,6 +191,13 @@ public class CollapsiblePanel extends JPanel { public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { + // if the collapsible is collapsed, we do not want its border to be + // painted. + if (c instanceof JXCollapsiblePane) { + if (((JXCollapsiblePane) c).isCollapsed()) { + return; + } + } g.setColor(getSeparatorColor()); if (isFirst(c)) { g.drawLine(x, y + 2, x + width, y + 2);