Burp Suite User Forum

Login to post

Setting Background of a JPanel when using the callback.CustomizeUiComponents method.

Kayode | Last updated: Aug 27, 2020 05:18AM UTC

I am done creating my extension and making it look a little presentable and organized. I have been look for ways to set the background color of a JPanel when using a jpanel and calling the callback.CustomizeUiComponents method. For example in the Dashboard Tab in burp locate Task, the panel that filter, running, paused, finished is light gray in light mode and dark in Darcula mode. How do i accomplish this when creating my own UI but in sync with burp ui theme. Thanks

Hannah, PortSwigger Agent | Last updated: Aug 27, 2020 06:58AM UTC

Hi Have you had a look at how existing BApp Store Extensions provide handling for dark mode - Hackvertor is a good example of an extension that provides a dark mode version. All BApp Store extensions have their code publicly available on GitHub. You can find them all here: https://github.com/portswigger

Kayode | Last updated: Aug 27, 2020 12:52PM UTC

Hello Hannah, thanks for the feedback, I just took a look at the source seams like theres a lot of if else conditional blocks, does the burp extender api have a way to tackle this theming or is there a color scheme that burp uses to know if its dark gray in dark theme it will change it to light gray in light theme. Just wondering if the api has a solution to this. Thanks.

Hannah, PortSwigger Agent | Last updated: Sep 01, 2020 11:21AM UTC

I would recommend calling customizeUiComponent() on your parent panel, as the customizing action is performed recursively on any child components of the passed-in component, and then see from there if any further changes need to be made. The "Bookmarks" extension functions well in dark mode and uses the customizeUiComponent() function so you could take a look at that as well?

You need to Log in to post a reply. Or register here, for free.