Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8014883

java.awt.container.add(component comp object constraints) doesn't work as expected on some linux platforms

XMLWordPrintable

    • 2d
    • b103
    • generic
    • linux
    • Verified

      Method java.awt.container.add(component comp object constraints) doesn't work as expected on x86, armv7 embedded systems with ubuntu installed.
      See result of running next code in attachment (addButtonLayout.JPG)

      import java.awt.*;
      public class addButtonLayout extends Frame {
        public static void main ( String [] args ) {
          Frame f = new Frame();
          f.setBackground(Color.WHITE) ;
          f.setSize(200,400);
          f.setVisible(true);
          Panel p = new Panel();
          p.setLayout(new BorderLayout());
          p.add(new Button("North"), BorderLayout.NORTH);
          p.add(new Button("South"), BorderLayout.SOUTH);
          p.add(new Button("East"), BorderLayout.EAST);
          p.add(new Button("West"), BorderLayout.WEST);
          p.add(new Button("Center"), BorderLayout.CENTER);
          f.add(p);
          f.setVisible(true);
        }
      }

      Reproduced on embedded atom systems with ubuntu 11.04, ubuntu 11.10, ubuntu 12.04 with any build of JDK8.
      Not reproduced with any build of JDK7 (see result in attachment - addButtonLayout_jdk7.JPG)

            prr Philip Race
            vmissing Vitaly Missing (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: