title: Disable JButton focus border
body: <p>I have a problem with JButton in Java. Basically, I want to disable the button's border (the button is added to JDesktopPane ). </p>
  
  <p>Here is my code :</p>
  
  <pre><code> JButton j = new JButton("BUTTON");
   j.setIcon(icon1); //icon1 : icon//
   j.setFocusable(true);
   j.setContentAreaFilled(false);
   j.setBounds(90, 20, 130, 30);
   dtp.add(j); //dtp : JDesktopPane//
  </code></pre>
  
  <p>It could let the border disappear like in this image:</p>
  
  <p><img src="https://i.stack.imgur.com/yqrOg.jpg" alt="enter image description here"></p>
  
  <p>But when my mouse is clicked (not moved around) into the button, there is a "dot" border around the button, like this:</p>
  
  <p><img src="https://i.stack.imgur.com/zHCy6.jpg" alt="enter image description here"></p>
  
  <p>So, how could I set the button so that when I don't move the mouse around the button area, it's still set like the first image, but when I move the mouse around, there's a square around the button (with a light-blue background)?</p>