The Height is 0, why, can I set it?

Thanks

import java.awt.*;

import java.awt.BorderLayout;

import javax.swing.*;

import java.util.Hashtable;

import java.awt.event.*;

import javax.swing.event.*;

import java.applet.Applet;

publicclass Comboxextends JApplet

{

...

publicvoid init(){

try{

SwingUtilities.invokeAndWait(new Runnable(){

publicvoid run(){

initComponents();

}

});

}catch (Exception ex){

ex.printStackTrace();

}

}

...

privatevoid initComponents(){

FileSelection fs =new FileSelection();

File fileName = fs.getFile();

Dimension dim = getSize();

int Width = dim.width;

int Height = dim.height;

System.out.println(Height);// found Height is 0

[1875 byte] By [ardmorea] at [2007-11-27 11:25:29]
# 1

did you set the size of the applet?

think if you don't set the size the height and width would be 0.

Yannixa at 2007-7-29 16:04:43 > top of Java-index,Desktop,Core GUI APIs...