Index: StatusLine.java =================================================================== RCS file: /cvs/core/src/org/netbeans/core/windows/StatusLine.java,v retrieving revision 1.9 diff -c -r1.9 StatusLine.java *** StatusLine.java 17 Apr 2002 14:13:38 -0000 1.9 --- StatusLine.java 25 Apr 2002 14:24:44 -0000 *************** *** 83,89 **** if (Boolean.getBoolean("netbeans.windows.small_main_window")) { // NOI18N // #19910: make sure GBL does not try to squeeze out menu labels. // See MainWindow.StatusMenuBar. ! d.width = Math.min(d.width, 100); } else { d.width = 1024; } --- 83,112 ---- if (Boolean.getBoolean("netbeans.windows.small_main_window")) { // NOI18N // #19910: make sure GBL does not try to squeeze out menu labels. // See MainWindow.StatusMenuBar. ! JMenuBar menuBar = WindowManagerImpl.mainWindow().getJMenuBar(); ! Component[] comps = menuBar.getComponents(); ! int prefWidth; ! int availWidth = menuBar.getSize().width; ! if (availWidth > 0) { ! for (int i = 0; i < comps.length; i++) { ! if (!comps[i].equals(this)) { ! prefWidth = comps[i].getPreferredSize().width; ! if ((comps[i] instanceof JButton) || (comps[i] instanceof JMenu)) { ! //Subtract width allocated for menu items and buttons ! availWidth -= prefWidth; ! } ! } ! } ! if (availWidth < 0) { ! //No space available for status line ! d.width = 0; ! } else { ! d.width = availWidth; ! } ! } else { ! //Set minimum width if we do not know available width ! d.width = Math.min(d.width, 100); ! } } else { d.width = 1024; }