X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=inline;f=src%2FMainWindowsView.java;h=85470ff4636bc67730f5ca54eff5d8e34cc38af9;hb=bb6c655ae5fafc833209b3950b3e69e8f539a42a;hp=3fab8e02b774161fcce1767236b8fdc3f2e03e3c;hpb=c281942a8705cc295af41cbeb55b864563892a94;p=Persons_Comparator.git diff --git a/src/MainWindowsView.java b/src/MainWindowsView.java index 3fab8e0..85470ff 100644 --- a/src/MainWindowsView.java +++ b/src/MainWindowsView.java @@ -11,7 +11,7 @@ public class MainWindowsView extends JFrame { MainWindowsView(String title, JPanel panel) { //Create and set up the window. setTitle(title); - setSize(300, 300); + setSize(panel.getPreferredSize()); setLocationRelativeTo(null); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); @@ -34,7 +34,7 @@ public class MainWindowsView extends JFrame { /** * Create menu that support cut/copy/paste. */ - public JMenuBar createMenuBar() { + private JMenuBar createMenuBar() { JMenuItem menuItem; JMenuBar menuBar = new JMenuBar();