louieansonng
louieansonng

Reputation: 343

Visibility.GONE in Java

I am using a gridlayout with several buttons placed in a panel and I need a button placed in the middle to disappear. However, when I set the setVisible method to false, there is a space in between the buttons and I need the remaining buttons below to move up to cover the space done by the method. This is similar to the visibility mode GONE in android. How do I do this in Java?

Upvotes: 1

Views: 459

Answers (1)

jackrabbit
jackrabbit

Reputation: 5663

The MigLayout layout manager supports a hidemode directive that does exactly this.

Upvotes: 2

Related Questions