All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.alantea.swing.pageelements.elements.ContainerElement Maven / Gradle / Ivy

The newest version!
package net.alantea.swing.pageelements.elements;

import java.awt.FlowLayout;
import java.lang.reflect.Field;
import java.util.Map;

import javax.swing.JButton;
import javax.swing.JPanel;

import net.alantea.swing.pageelements.GUIFieldElement;

public class ContainerElement extends GUIFieldElement
{   
   private JPanel rightPanel;
   
   public ContainerElement(String type, Field field, Object target,
         String key, boolean editable, String page, int height, int order, Map attrs)
   {
      super(type, field, target, key, editable, page, height, order, attrs);
      
      
      rightPanel = new JPanel();
      rightPanel.setLayout(new FlowLayout());
   }

   @Override
   protected JPanel getSpecificGUIComponent()
   {
      return rightPanel;
   }
   
   public void addButton(JButton button)
   {
      rightPanel.add(button);
   }
   
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy