ui.Panel.clear
Removes all widgets from the panel.
Returns this panel.
Usage | Returns |
---|
Panel.clear() | ui.Panel |
Argument | Type | Details |
---|
this: ui.panel | ui.Panel | The ui.Panel instance. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["`Panel.clear()` removes all widgets from the specified panel."],["This method returns the ui.Panel object, allowing for method chaining."],["It is used to reset the panel to its initial state, effectively removing existing UI elements."]]],["The `Panel.clear()` method removes all widgets from a specified `ui.Panel` instance. This method directly modifies the panel by clearing its content. It takes a `ui.Panel` instance as input and returns the same `ui.Panel` object after the widgets have been removed. No arguments beside the panel itself are required. This method's primary action is to empty the panel of all widgets.\n"]]