@Override public void paint(Graphics g, JComponent c) { // yet another dirty mac hack to prevent painting background outside of // border. if (hasMacTextFieldBorder(c)) { Insets borderInsets = layoutAndBorder.getRealBorderInsets(); borderInsets.left -= MAC_MARGIN.left; int height = c.getHeight() - borderInsets.bottom - borderInsets.top + MAC_MARGIN.bottom + MAC_MARGIN.top; int width = c.getWidth() - borderInsets.left - borderInsets.right + MAC_MARGIN.right; g.clipRect(borderInsets.left, borderInsets.top, width, height); } super.paint(g, c); }
@Override public void paint(Graphics g, JComponent c) { // yet another dirty mac hack to prevent painting background outside of // border. if (hasMacTextFieldBorder(c)) { Insets borderInsets = layoutAndBorder.getRealBorderInsets(); borderInsets.left -= MAC_MARGIN.left; int height = c.getHeight() - borderInsets.bottom - borderInsets.top + MAC_MARGIN.bottom + MAC_MARGIN.top; int width = c.getWidth() - borderInsets.left - borderInsets.right + MAC_MARGIN.right; g.clipRect(borderInsets.left, borderInsets.top, width, height); } super.paint(g, c); }
@Override public void paint(Graphics g, JComponent c) { // yet another dirty mac hack to prevent painting background outside of // border. if (hasMacTextFieldBorder(c)) { Insets borderInsets = layoutAndBorder.getRealBorderInsets(); borderInsets.left -= MAC_MARGIN.left; int height = c.getHeight() - borderInsets.bottom - borderInsets.top + MAC_MARGIN.bottom + MAC_MARGIN.top; int width = c.getWidth() - borderInsets.left - borderInsets.right + MAC_MARGIN.right; g.clipRect(borderInsets.left, borderInsets.top, width, height); } super.paint(g, c); }
@Override public void paint(Graphics g, JComponent c) { // yet another dirty mac hack to prevent painting background outside of // border. if (hasMacTextFieldBorder(c)) { Insets borderInsets = layoutAndBorder.getRealBorderInsets(); borderInsets.left -= MAC_MARGIN.left; int height = c.getHeight() - borderInsets.bottom - borderInsets.top + MAC_MARGIN.bottom + MAC_MARGIN.top; int width = c.getWidth() - borderInsets.left - borderInsets.right + MAC_MARGIN.right; g.clipRect(borderInsets.left, borderInsets.top, width, height); } super.paint(g, c); }