Trying to draw two points at either end of a component, however, getLocalBounds().getHeight() returns 0 when called from the constructor. I then tried to call it from the resized() method which works but resets the points’ positions every time I resize the component.
leftPoint.setXY(0, getLocalBounds().getHeight() / 2);
rightPoint.setXY(getLocalBounds().getWidth(), getLocalBounds().getHeight() / 2);
These would be the points’ initial positions, but I can’t initiate them in this position from the constructor.