• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

jmenubar,menuitem

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic