Bug #76302
Downloads table not focussed on start-up
Status: | New | Start date: | 12/21/2015 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | GUI | Estimated time: | 0.75 hour | |
Target version: | 020 - Next Release 2.0 | |||
Resolution: |
Description
Although there's this line in the DownloadsPanel
class in onShow()
:
table.requestFocusInWindow();
the downloads table is not focussed on start-up. According to my research,
DownloadsPanel.onShow()
never gets called. It it called when setShown()
is called. (See View.setContent()
to see why setShown()
is not called.)
I tried calling requestFocusInWindow()
in JDGui.internalInitLocationAndDimension()
after
WindowManager.getInstance().setVisible(mainFrame, true, FrameState.OS_DEFAULT);
but this still doesn't work. The only thing I got to work was the following (at the location previously mentioned):
new DelayedRunnable(5000) {
@Override
public void delayedrun() {
((DownloadsPanel)MainTabbedPane.getInstance().getSelectedView().getContent()).getTable().requestFocusInWindow();
}
}.resetAndStart();
(There's some delay with the menu bar and tool bar happening until the GUI is fully loaded. Obviously,
requestFocusInWindow()
only has effect thereafter.)
OS: Windows 8.1