• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help Please Urgent

 
john mattucci
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
mohana konakanchi
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!