2

I have a created a custom Button field , when the button is on focus default blue background is coming , i want to remove that blue background . actually i am placing image on button and on image there are certain area which is transparent . when that custom button is on focus then blue background is displayed . i want to remove that blue background.

Thanks alot

rupesh
  • 420
  • 2
  • 19

2 Answers2

10

Override method

protected void drawFocus(Graphics graphics, boolean on) {
        if (on) {
                 //draw your own custom focus.
                }
            }
Vivart
  • 14,900
  • 6
  • 36
  • 74
0

override method

public void onFocus(int direction) {}

and don't invoke super.onFocus in it

oxigen
  • 6,263
  • 3
  • 28
  • 37
  • Still i am facing the same problem after removing super.onFocus() from onFocus(int direction){} – rupesh May 12 '10 at 09:21