Examples of maximumLayoutSize()


Examples of javax.swing.OverlayLayout.maximumLayoutSize()

    c2.setPreferredSize(new Dimension(50, 50));
    c2.setMaximumSize(new Dimension(60, 60));
    c.add(c2);
    OverlayLayout l = new OverlayLayout(c);
    h.check(l.maximumLayoutSize(c).width, 60);
    h.check(l.maximumLayoutSize(c).height, 60);
  }

  /**
   * Tests this method with 3 child components that have different alignment
   * values.
 
View Full Code Here

Examples of javax.swing.OverlayLayout.maximumLayoutSize()

    c3.setPreferredSize(new Dimension(50, 50));
    c3.setMaximumSize(new Dimension(60, 60));
    c3.setAlignmentX(1.0F);
    c.add(c3);
    OverlayLayout l = new OverlayLayout(c);
    h.check(l.maximumLayoutSize(c).width, 90);
    h.check(l.maximumLayoutSize(c).height, 60);
  }

  /**
   * Tests this method with the wrong container.
View Full Code Here

Examples of javax.swing.OverlayLayout.maximumLayoutSize()

    c3.setMaximumSize(new Dimension(60, 60));
    c3.setAlignmentX(1.0F);
    c.add(c3);
    OverlayLayout l = new OverlayLayout(c);
    h.check(l.maximumLayoutSize(c).width, 90);
    h.check(l.maximumLayoutSize(c).height, 60);
  }

  /**
   * Tests this method with the wrong container.
   *
 
View Full Code Here

Examples of javax.swing.OverlayLayout.maximumLayoutSize()

    JPanel c1 = new JPanel();
    JPanel c2 = new JPanel();
    OverlayLayout l = new OverlayLayout(c1);
    try
      {
        h.check(l.maximumLayoutSize(c2).width, 30);
        h.fail("maximumLayoutSize must throw AWTError when "
               + "called with wrong container.");
      }
    catch (AWTError ex)
      {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.