javafx check is a shape object is a rectangle code example Example: javafx object rectangle Rectangle rectangle = new Rectangle(100,100)