Could anyone please explain why this may be happening?
Image is here Image I couldn’t upload because I’m a new user.
setTitle("jNote");
pack();
setVisible(true);
setLayout(new BorderLayout());
setDefaultCloseOperation(EXIT_ON_CLOSE);
Image icon = Toolkit.getDefaultToolkit().getImage("jNote.png");
setIconImage(icon);
Usually GUI size can be suggested by the contents. If called after the components are added,
pack()will cause the GUI to be the minimum size it needs to display them.