Preheat the oven to 350 degrees Fahrenheit.
In a medium mixing bowl, stir together the softened butter, flour, baking powder, beaten egg, milk, and butter flavoring until a soft dough forms.
Spread the flour mixture evenly into an ungreased 9-inch square baking pan.
Carefully spread the apricot jam over the dough using the back of a spoon or small offset spatula.
In another bowl, mix together the sugar, beaten egg, melted butter, vanilla extract, and shredded coconut until fully combined.
Drop the coconut topping over the apricot layer by spoonfuls, then gently spread it into an even layer.
Bake for 25 to 30 minutes or until the top is lightly golden brown.
Let the bars cool completely before slicing into squares.