Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Help Please Urgent

 
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
What's brown and sticky? ... a stick. Or a tiny ad.
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic