}
private void createGUI(ISession session)
{
setVisible(false);
final IApplication app = session.getApplication();
Icon icon = app.getResources().getIcon(getClass(), "frameIcon"); //i18n
if (icon != null)
{
setFrameIcon(icon);
}
// This is to fix a problem with the JDK (up to version 1.3)
// where focus events were not generated correctly. The sympton
// is being unable to key into the text entry field unless you click
// elsewhere after focus is gained by the internal frame.
// See bug ID 4309079 on the JavaSoft bug parade (plus others).
addWidgetListener(new WidgetAdapter()
{
public void widgetActivated(WidgetEvent evt)
{
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
_sqlPanel.getSQLEntryPanel().getTextComponent().requestFocus();
}
});
}
public void widgetClosing(WidgetEvent e)
{
_sqlPanel.sessionWindowClosing();
}
});
_sqlPanel = new SQLPanel(getSession(), false);
// Needed to make the panel set the divider location from preferences
_sqlPanel.setVisible(true);
_toolBar = new SQLToolBar(getSession(), _sqlPanel.getSQLPanelAPI());
JPanel contentPanel = new JPanel(new BorderLayout());
contentPanel.add(_toolBar, BorderLayout.NORTH);
contentPanel.add(_sqlPanel, BorderLayout.CENTER);
Font fn = app.getFontInfoStore().getStatusBarFontInfo().createFont();
_statusBar.setFont(fn);
contentPanel.add(_statusBar, BorderLayout.SOUTH);
RowColumnLabel lblRowCol = new RowColumnLabel(_sqlPanel.getSQLEntryPanel());
_statusBar.addJComponent(lblRowCol);