title: Java code to enforce to have number and character in Jtextfield
body: <p>I have Jtextfield, I want to format it, so that it should accept in the format below.</p>
  
  <p>KYC123456L</p>
  
  <p>Input will always start with "KYC" and ends with "L" and 6 numbers in between.</p>
  
  <p>UI has a button that will copy the contents of other components and save it to a text file. But before it copies it should validate the jtextfield and copy if only format above matches, if not a message to be displayed.</p>
  
  <p>Please suggest.</p>