Skip to content

Changing insets in GridBagLayout GUI designer leads to permanent high CPU load #9060

@PetrMiksik

Description

@PetrMiksik

Apache NetBeans version

Apache NetBeans 28

What happened

Certain operations in GridBagLayout designer leads to permanent high CPU load.

Language / Project Type / NetBeans Component

No response

How to reproduce

In Swing GUI designer, create a new JPanel and set layout to GridBagLayout. Place any swing control into panel and open GridBagLayout designer. Enlarge any inset by by pressing to plus button several times. Now shrink insets back to zero by pressing the minus button. It must be pressed several times and fast. When insets reach zero, the CPU consumption significantly rises (usually 1 - 2 cores to 100%). If you enlarge the insets back to non-zero value, the CPU load drops back to normal. But if you keep zero insets and close the window, the CPU load becomes permanent.

Here are some screenshots of the particular thread's CPU and memory consumption. Hope it helps.

Image Image Image

Did this work correctly in an earlier version?

Apache NetBeans 24 or earlier

Operating System

Ubuntu 24.04

JDK

JDK 25 bundled with NetBeans

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

No response

Are you willing to submit a pull request?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    FormDesignerGUI builder, also known as Matissekind:bugBug report or fixneeds:triageRequires attention from one of the committers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions