I have a small JFrame on top of another JFrame which covers the entire comp screen. In the smaller JFrame I have a JMenuBar; once u click on the JMenu I would like for the menu to open and diplay itself completely without having to resize the frame. Something which im unable to do now the menu ends at the boundaries of the JFrame and the user would have to resize the screen. Can someone help please im really stuck
Hi I could not understand you problem completly. See this code: for setting the frame size: frame.setSize(300,300); // or frame.setSize(new Dimension(300,300)) frame.setVisiable(true); if you want to set to for current screen size use Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); frame.setSize(dim); hope this will help Mohana
Hi John, I am not sure why you have a problem. Try the following code. It creates a frame that is very short and has a large pulldown menu that displays itself fully (goes beyond the frame border) when it is displayed. I am running on JDK1.2.
Regards, Manfred.
What's brown and sticky? ... a stick. Or a tiny ad.
Free, earth friendly heat - from the CodeRanch trailboss