Using PanelComponent for Text Rendering
Learn how to use PanelComponent and LineComponent for clean, professional text overlays with proper styling and alignment.
3 steps
Progress1 / 3 steps
1
Introduction to PanelComponent
Step 1 of 3
Objective
Understand why PanelComponent is better than raw graphics.drawString().
Explanation
PanelComponent is RuneLite's recommended way to render text overlays. It provides: - Automatic background rendering - Proper text alignment - Color support - Better performance - Consistent styling Instead of using `graphics.drawString()`, you create a PanelComponent and add LineComponent objects to it.
Your Code
java
AdvertisementSet
slotId on <AdUnit /> to show ads.