/* * Created by JFormDesigner on Wed Mar 12 16:06:47 CST 2025 */ package gui.UI_LenheartUI; import java.awt.*; import javax.swing.*; /** * @author dongj */ public class ExplosiveControl extends JPanel { public ExplosiveControl() { initComponents(); } private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents @formatter:off //======== this ======== setLayout(null); { // compute preferred size Dimension preferredSize = new Dimension(); for(int i = 0; i < getComponentCount(); i++) { Rectangle bounds = getComponent(i).getBounds(); preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width); preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height); } Insets insets = getInsets(); preferredSize.width += insets.right; preferredSize.height += insets.bottom; setMinimumSize(preferredSize); setPreferredSize(preferredSize); } // JFormDesigner - End of component initialization //GEN-END:initComponents @formatter:on } // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables @formatter:off // JFormDesigner - End of variables declaration //GEN-END:variables @formatter:on }