Cannot coerce value '2' into type: interface javax.swing.border.Border

Show us the expression. Please see Wiki - how to post code on this forum.