This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 120019

Summary: Toolbars resize policies (Toolbars occupy more vertical space then needed after window resize)
Product: platform Reporter: cnschoen <cnschoen>
Component: Window SystemAssignee: Stanislav Aubrecht <saubrecht>
Status: RESOLVED FIXED    
Severity: blocker CC: jrojcek, mslama, saubrecht
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: Window after operations

Description cnschoen 2007-10-25 12:47:12 UTC
1. start Netbeans 6.0 Beta 2 or 5.5.1 after installing it for the first time (runs in a normal window, not in fullsreen 
   mode))
2. pick the right bottom corner and rotate with the mouse. (you can see how slow the Netbeans 
    window is repainted on a 3 GHz Pentium PC - Sorry, but Eclipse is here much faster ...)
3. The error appears if the window is minimized by moving the mouse to the upper left corner (and the Netbeans window
   client area has the height=0 and width=0) After resizing the window there is only the start page (and no file explorer 
   + project window) The Toolbar has 3 rows of icons. - But there would be more than enough space for the icons in the 
   first row
Comment 1 cnschoen 2007-10-25 12:48:54 UTC
Created attachment 51663 [details]
Window after operations
Comment 2 David Simonek 2007-10-25 13:34:40 UTC
I see, what you are saying is that toolbars should return to fill only just one row automatically - return to the state
before window resizing, right?

Well, that's a bit complicated. Currently we have "half-automatic" toolbar sizing, which tries to ensure that toolbar
buttons are always visible, which is good thing IHMO, but leads to the problems you mentioned.

IMHO we should decide between two toolbar modes or enable both:

1) "Fixed" mode, where toolbars won't change positions automatically at all. When some toolbar buttons are made
invisible, there is "extra" button to reach hidden buttons. That's the way how OpenOffice does it for example.

2) "Automatic" mode, which ensures that toolbar buttons are always visible and always occupy minimum number of rows as
possible. User can't move toolbars in this mode freely, he/she can only reorder them.

Current behavior is as designed, so I'm changing to enhancement and ccing people that may be interested in.
Comment 3 adrienclerc 2008-10-23 13:18:19 UTC
I want to add a new problem for that. I have a laptop normally connected to its docker, with two screens (internal +
external). NB remembers windows positions & sizes, but sometimes, when I use only the internal panel of the laptop, the
main window is positioned in the left side of the screen with a width of 0. This is due to the fact that normally, this
window is on the other screen.
But now, I use this window in the maximized state. At startup, the main window display itself in the "normal" size (not
maximized), and then maximizes itself. But my computer is too fast for me to notice that size change.
Here is the symptom : each time I start NB, my three toolbars are on three lines. I've spent a looooooooooooong time not
understanding what was happening. A workaround is to give a "normal" size to the not maximized window. But except the
fact that Swing really sucks by not maximizing windows when calling setVisible(true), the toolbar positions should be
saved to be restored after startup.
Comment 4 David Simonek 2008-10-23 16:02:19 UTC
Passing to Standa, perhaps somewhere is duplicate already?
Comment 5 Lukas Hasik 2008-11-19 15:22:47 UTC

*** This issue has been marked as a duplicate of 140863 ***
Comment 6 Lukas Hasik 2008-11-20 16:52:13 UTC
reopening because this one should stay opened closing the duplicated one
Comment 7 Lukas Hasik 2008-11-20 16:52:41 UTC
*** Issue 140863 has been marked as a duplicate of this issue. ***
Comment 8 Stanislav Aubrecht 2008-11-28 11:41:19 UTC
the toolbars should behave correctly now - 4f828389f2be

as for the resizing of splitters in the main window - that's how netbeans ide works. please file a new RFE if you'd like
some automatic resizing
Comment 9 Lukas Hasik 2008-12-15 11:40:21 UTC
*** Issue 155181 has been marked as a duplicate of this issue. ***