0

Hi people,

How can I put a JRadioButton wherever I want in a JPanel? I tried setLocation() but it did not change anything. It is still on the north-center part of the panel. I think I'm missing something, but I can't figure it out. Thank you in advance.

2
Contributors
5
Replies
6
Views
5 Years
Discussion Span
Last Post by NormR1
1

Did you remove the layout manager so that you have exclusive control vs competing with the layout manager over who gets to set the location of a component?

0

Thank you for your concern, but I fixed it. I set the layout null and use setBounds() method for the radio button.

0

Glad you found it. That was what I was saying about the layout manager: remove the layout manager.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.