A very hard question

Hi all ,
Have you ever seen this problem ? What is happening with my menu ? It is obstructed  by the other . Here is the image .

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Can You put some of Your code please?
hellovnAuthor Commented:
bar = new JMenuBar();


getContentPane().add(toolBar, BorderLayout.NORTH);
getContentPane().add(searchBar, BorderLayout.EAST);
getContentPane().add(simpleBean, BorderLayout.CENTER);

dimension = Toolkit.getDefaultToolkit().getScreenSize();

simpleBean is an instance of SimpleBean class extended Container class .
just try this, it works fine for me, maybe it won't for You:

import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;

public class R extends JFrame {
  R() {
  public void init() {
    JMenuBar jmb = new JMenuBar();
    JMenu jmFile = new JMenu("File");
    JMenuItem jmiNew = new JMenuItem("New", KeyEvent.VK_N);
    JMenuItem jmiExit = new JMenuItem("Exit", KeyEvent.VK_E);
    setLayout(new BorderLayout());
    add(jmb, BorderLayout.NORTH);
    JPanel panel = new JPanel();
    panel.add(new JTextArea(30,30));
  public static void main(String[] args) {
    R r = new R();
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

hellovnAuthor Commented:
Your program is correct  . But it can't help me .
So post Yours, maybe I'll find the problem.
SimpleBean is not Swing then?  Because mixing AWT and Swing components can result in problems like this, AFAIK.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
That's it, doronb is right, You'll have to rewrite Your program to use only awt package, or only swing.
hellovnAuthor Commented:
Ok , he's right . I've mixed AWT and Swing . But I don't want to replace Swing components with AWT Components . Is there a solution for it ?
Mayank SPrincipal TechnologistCommented:
Yes, use the Swing equivalents of the AWT components which you have, so that everything is Swing-based....
You can either use all Swing, or all AWT components.  Using both means that the OS's threads and Java's Swing-paint thread are fighting one another ;)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.