From: Hiroo H. <hir...@co...> - 2005-02-23 04:58:05
|
Hi Rib, Rib> Of course we need to move the menu stuff out of the Desktop classes Rib> first, I've been working on this and it is almost done on my local work space. Once 0.20 CVS tag will be made I'll check it in. I have two questions to you to complete the work. JSLFrame has the following code for Mac OS. public void setVisible(boolean b) { if (MacUtils.isMac()) { if (b && getJMenuBar() == null) { setJMenuBar(Actions.createMenuBar()); } else if (!b) { // Remove menubar so frame can be disposed. // http://archives:arc...@li.../archives/java-dev/2003/Dec/04/disposingofjframesusescr.001.txt //JMenuBar mb = getJMenuBar(); setJMenuBar(null); desktop.getInvisible().getJFrame().requestFocus(); requestFocus(); } } .... Q1. It seems that a frame can not be disposed unless menu bar is removed by calling setJMenuBar(null). Is it still true for J2SE 1.4 and/or later which is the requirement of JSynthLib? (In other words, do we still have to do this hack?) The URL in the comment above is not valid now. Q2. There are two requestFocus() call in the code above. Do we really need the first one ("desktop.getInvisible().getJFrame().requestFocus();")? I think the effect of the first one is hidden by the second one. Thanks. -- Hiroo Hayashi |