Hi, Hoping to get some suggestions or pointers. How do I make the menubar behave like MS windows fashion, when the window is resized. Perhaps one of the following behaviour. 1. A scroll arrow thing appears, if all the menus cannot be displayed - IE 2. The menu's wrap into the next row - Visual InterDev, Notepad 3. or even, only the left-most menus are displayed, if there is not enough room. I have looked at Javadocs and java sources, the only way seems to be to pass the menubar your own layout manager object(GridbagLayout is probabely most appropriate), but that is gonna be a bit of a hassle, i want to leave that as the last choice. Would Eclipse's SWT library be better at this kind of thing? thanks Sandeep
hi, this code will place the menus starting on the left side. each item will keep its size even when the window is resized. the right most menus will disappear if the window gets to small.
how to make the JMenuBar have more lines or diplay a scrollpane want work without subclassing it, I think. at least not the scrollpane solution as JFrame wants a JMenuBar as argument. chantal [ October 17, 2002: Message edited by: Chantal Ackermann ]
Thanks Chantal, Unfortunately, that did not solve my problem. If i set the layout to FlowLayout, it messes up the appearance of the menubar(The bottom border does not appear properly), and leaves too much space between menus(even when i specify the horizontal gap to be 0). I might have to look at subclassing one of the classes in javax.swing.plaf.basic that provide the UI to a menubar. sunny