263 |
if (!menuBars.contains(menuBar)) |
if (!menuBars.contains(menuBar)) |
264 |
menuBars.add(menuBar); |
menuBars.add(menuBar); |
265 |
} |
} |
266 |
|
|
267 |
|
/** |
268 |
|
* Unregisters a JMenuBar from its top-level container. This is |
269 |
|
* called before the JMenuBar is actually removed from the container |
270 |
|
* so findTopLevel will still find us the correct top-level container. |
271 |
|
* @param menuBar the JMenuBar to unregister. |
272 |
|
*/ |
273 |
|
public void unregisterJMenuBar (JMenuBar menuBar) |
274 |
|
{ |
275 |
|
Container topLevel = findTopLevel(menuBar); |
276 |
|
Vector menuBars = getVectorForTopLevel(topLevel); |
277 |
|
if (menuBars.contains(menuBar)) |
278 |
|
menuBars.remove(menuBar); |
279 |
|
} |
280 |
} |
} |