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

[macosx] Need minimum size for titled Frames and JFrames

XMLWordPrintable

    • b13
    • generic
    • os_x
    • Verified

        http://java.net/jira/browse/MACOSX_PORT-166 submitted 2011/07/18 by ddurrence
        Simple Frame or JFrame fails to draw unless one or more components are added and pack is called.
        Compile and run one of the following simple test cases:
        import javax.swing.JButton;
        import javax.swing.JFrame;
        public class SimpleJFrame
        {
            public static void main(String[] args)
            { JFrame frame = new JFrame("Boom!"); /* For the JFrame to show, it must have real content and pack must be called. Uncomment the following two lines to have the frame draw on screen. */ // frame.add(new JButton("Bogus Button"));// frame.pack(); frame.setVisible(true); }}
        — OR —
        import java.awt.Frame;
        import java.awt.Button;
        public class SimpleFrame
        {
            public static void main(String[] args)
            { Frame frame = new Frame("Boom!"); /* For the Frame to show, it must have real content and pack must be called. Uncomment the following two lines to have the frame draw on screen. */ // frame.add(new Button("Bogus Button"));// frame.pack(); frame.setVisible(true); }}

              anthony Anthony Petrov (Inactive)
              vasya Vassili Igouchkine (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: