Search code examples
javaswingwindowbuilder

Java swing easy one but I don't know it


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


Solution

  • You should use this:

    button.setFocusPainted(false);
    

    java, swing, awt, remove focus from all objects