Two ways:
-- Assign a reference to the rectangle to an instance field and use that instance field in a paintComponent override to draw the rectangle
-- Draw the rectangle to a BufferedImage and draw the BufferedImage to the JLabel in a paintComponent override.
It might be easier to give you a more specific answer if you post a
SSCCE showing what you have tried so far.