Thanks for the reply, I post the class that gives the problems on the last line visible(true).
public class MainFrame extends JFrame
implements ParentFrame, ActionListener, ChangeListener, KeyListener,
ToolBarListener
{
/* Toolbar item constants */
public static final String CONFIG_WINDOWFRAME_TAG = "windowframe";
public static final String CONFIG_MAPDRAWING_TAG = "mapdrawing";
public static final String CONFIG_APPLICATION_TAG = "application";
public static final String CONFIG_CONSOLE_TAG = "consolewindow";
public static final String CONFIG_LEGEND_TAG = "legendwindow";
public static final String CONFIG_NORTHARROW_TAG = "north_arrow";
public static final String CONFIG_MAPSCALE_TAG = "map_scale";
public static final String CONFIG_TOOLBARITEM_TAG = "toolbaritem";
private static final String TOOLBARITEM_LEGEND_ACTION = "togglelegend";
private static final String TOOLBARITEM_VIEW_PARAMS = "viewparams";
private static final String TOOLBARITEM_QUERY_MAP = "querymap";
private static final String TOOLBARITEM_DEFAULT = "$default";
private static final String TOOLBARITEM_ZOOMIN = "$zoomin";
private static final String TOOLBARITEM_ZOOMOUT = "$zoomout";
private static final String TOOLBARITEM_PAN = "$pan";
private static final String TOOLBARITEM_MAPLEGEND = "$maplegend";
/** */
private static final String
CONFIG_ERROR_DIALOG_TITLE = "Configuration Parameters Error";
/* Main java application object */
private jgrass.client.Main main;
/* Splash screen object. */
public SplashWindow splash = null;
/* Main frame toolbar object */
private JPanel toolbarPanel;
/* Vector storage for module objects that must be
* installed after a user has logded in. */
// private Vector loginModules = null;
/* Active module component */
private DisplayModule activeModule = null;
/* Class logger instance. */
private Logger logger = LogManager.getLogger(this.getClass().getName());
/* Status panel */
private JPanel statusBar;
/* Taskbar panel */
private JToolBar taskBar;
/* */
private Hashtable visibletoolbars = new Hashtable();
/* */
private JLabel statusMessage = new JLabel("", JLabel.LEFT);
private AnimatedLabel busy = null;
/* Configration class */
public Configuration config;
/* Legend Frame */
private LegendPane legend = null;
/* 3D View Frame */
private View3DPane view3d = null;
/* */
private QueryPane querywindow = null;
/* */
private Console console = null;
private CloseButtonTabbedPane consoleTab = null;
private Color consoleTabActiveColor = null;
private Color consoleTabInactiveColor = null;
// private TitledBorder glCanvasBorder = null;
// private GLRenderer glRenderer = null;
private JToolBar mapToolbar = null;
/**
* Keys pressed
*/
/**
* Constructor for the main application frame which holds the GLCanvas
* and the Console.
* @param jgrass.client.Main Application object.
* @param Configuration confoguration object that holds the config.xml data.
*/
public MainFrame(jgrass.client.Main _main, Configuration _config)
{
super();
GrassEnvironmentManager.getInstance().setParentFrame(this);
main = _main;
config = _config;
splash = main.splash;
/* Set look and feel specified in configuration file */
LookAndFeel lf = config.getLookAndFeel();
/* Set windowframe settings taken from configuration parameters */
setTitle(config.getWindowTitle() + ResourceLoader.getBuild());
setIconImage(ResourceLoader.LoadImage(_config.getWindowIcon()));
UIManager.put("ToolTip.font", new FontUIResource(config.getTipFont()));
UIManager.put("ToolTip.background", new ColorUIResource(
config.getTipBackgroundColor()));
splash.setStatus("Loading configuration. Please wait...");
splash.incProgress();
applyConfiguration();
splash.setStatus("Starting up main window. Please wait...");
splash.incProgress();
/* Set windowframe settings taken from configuration parameters */
Dimension sz = config.getWindowDimension();
Point pos = new Point(0,0);
if (sz.width == -1)
{
sz.width = (int)((float)Toolkit.getDefaultToolkit().getScreenSize().width *.8);
}
pos.x = (Toolkit.getDefaultToolkit().getScreenSize().width - sz.width) / 2;
if (sz.height == -1)
{
sz.height = (int)((float)Toolkit.getDefaultToolkit().getScreenSize().height *.8);
}
pos.y = (Toolkit.getDefaultToolkit().getScreenSize().height - sz.height) / 2;
setLocation(pos);
setSize(sz);
// pack();
setVisible(true);
}