addSidebarTab

fun addSidebarTab(tabName: String, icon: BufferedImage?, panel: JPanel)

Adds a sidebar tab with a Swing JPanel that appears in RuneLite's sidebar. The tab is automatically removed when the script ends.

Parameters

tabName

Unique name for the tab (used as tooltip and key for removal)

icon

Optional 16x16 icon for the sidebar button; a default is used if null

panel

The JPanel to display when the tab is selected


fun addSidebarTab(tabName: String, icon: ImageVector?, f: @Composable () -> Unit)

Deprecated

Use addSidebarTab(String, BufferedImage?, JPanel) instead

Replace with

addSidebarTab(tabName, null, JPanel())