-
Bug
-
Resolution: Fixed
-
P4
-
7
-
b13
-
generic
-
os_x
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2222366 | 8 | Anthony Petrov | P4 | Resolved | Fixed | b36 |
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); }}
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); }}
- backported by
-
JDK-2222366 [macosx] Need minimum size for titled Frames and JFrames
-
- Resolved
-
- relates to
-
JDK-7133527 [macosx] Frame has minimal possible size with default layout and setSize()d child
-
- Closed
-