Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jmenubar,menuitem

 
purushotham naisa
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
 
Michael Dunn
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