Link to home
Create AccountLog in
Avatar of hipal
hipalFlag for United States of America

asked on

setting component Z Order

I am trying to set ZorderComponent of a button..

I am doing something like this -- panel.setComponentZOrder(button, 0);

After adding this line .. no matter what components I add to panel they do not show up :(

and if I remove this line they do show  :(
Avatar of Mick Barry
Mick Barry
Flag of Australia image

could be because the button is painting over all your other components.
can't tell exactly what the problem is without seeing your code
Avatar of hipal

ASKER

no it is not so .. i can see button is just in left corner
is it a standard JButton, or a subclass?
And what is its size?

just because you see it top left doesn't mean its not painting to more of the panel
give another component in the panel a lower z order than it
ASKER CERTIFIED SOLUTION
Avatar of hipal
hipal
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of hipal

ASKER

I got the mistake I was doing  !