Source:How to average BigDecimals using Streams?
@Override
public void setBounds(int x, int y, int width, int height) {
super.setBounds(x, y, width, height);
int pWidth = getPreferredSize().width;
setPreferredSize(new Dimension(pWidth, width / 2));
}