• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

jmenubar,menuitem  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sir i have a problem on my project.in my project i was used Jmenubar, menuitems it is not refresh based on the component now i am looking for a solution that is whenever user selected one menu item corresponding result will be displayed on same frame
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> sir i have a problem

probably just me, but your desciption gives
me no idea what the problem is.

if you post your code and explain what it does
do vs what you want it to do, we/i might
get a better grasp of the problem.
 
purushotham naisa
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Michael Dunn wrote:> sir i have a problem

probably just me, but your desciption gives
me no idea what the problem is.

if you post your code and explain what it does
do vs what you want it to do, we/i might
get a better grasp of the problem.





ok sir just wait i am sending my code

this is my code
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the basic problem is whenever you add anything to a container that is visible, you need to call:

[container].revalidate();
[container].repaint();

or, for awt

[container].validate();
[container].repaint();

but, going by your menuItems, you would probably be better off setting up the app as a CardLayout,
pre-building each panel, then just 'show' the panel relevent to the menuItem clicked.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!