-2

i'm new there. My first issue: When i start my GUI java swing application in Window Builder, first object is always selected

this

and when i click anything (button or anything) it's show like it's clicked and i don't want it to show. What command for this?

Unwanted thing

zolv
  • 1,720
  • 2
  • 19
  • 36
hubert
  • 5
  • 2

1 Answers1

0

You should use this:

button.setFocusPainted(false);

java, swing, awt, remove focus from all objects

Rockey
  • 393
  • 4
  • 18
  • Thanks mate, but i have nearly 200 buttons in my application, is there a command to set every button focuspaint off? – hubert May 09 '18 at 22:01
  • Not sure if this will work, but a quick google search gave me this: https://stackoverflow.com/questions/13422642/swing-remove-focus-border-from-dialogues-buttons – Rockey May 09 '18 at 22:04
  • That works, thanks alot ;> – hubert May 09 '18 at 22:13