public override fun paintComponent()

in src/main/kotlin/com/jetbrains/interactiveRebase/visuals/RoundedButton.kt [18:38]


    public override fun paintComponent(g: Graphics) {
        isContentAreaFilled = false
        val g2 = g as Graphics2D
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON)
        g2.color = backgroundColor
        g2.fill(
            RoundRectangle2D.Double(
                1.0,
                3.0,
                width.toDouble() - 3.0,
                height.toDouble() - 6.0,
                arcWidth.toDouble(),
                arcHeight.toDouble(),
            ),
        )
        super.paintComponent(g2)
        g2.dispose()
        setText(text)
        setBackground(backgroundColor)
        setForeground(foreground)
    }