Exemplo n.º 1
0
 public void setPreferredSize(double percentX, double percentY)
 {
     preferredSizeX = percentX;
     preferredSizeY = percentY;
     height         = (int)((panel.getHeight() * preferredSizeY) / 100);
     width          = (int)((panel.getHeight() * preferredSizeX) / 100);
 }
Exemplo n.º 2
0
 protected Layout(JPanel panel)
 {
     this.panel = panel;
     elements   = new List <UIElement>();
     setUpperLeftCorner(0, 0);
     setWidth(panel.getWidth());
     setHeight(panel.getHeight());
 }