JCombobox options going behind canvas

  1. I have taken a JFrame.
    I added Canvas to the frame.
    I added JToolbar to the frame.
    I added StatusBarPanel (extends JPanel) to the frame.

  2. Inside toolbar I have added a text box, a button and 3 combo boxes.

Now, whenever I write something in text box and then click on combo boxes, the combo boxes open up, but the contents are hidden behind the canvas.

Otherwise, whenever I do not write anything in text box and click on combo boxes, the combo boxes open up fine.

How to solve the issue?
(I am working on java 8)

Inside class MyFrame extends JFrame{
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    setSize(screenSize.width - 60, screenSize.height);

    Canvas canvas = new Canvas();

    MyToolbar myTb = new MyToolbar(myfr);

Inside class MyToolbar extends JToolbar{
    MyToolbar(MyFrame myframe){
        toolbar = new JToolBar("My Toolbar");
        toolbar.setBorder(new EmptyBorder(new Insets(8,8,8,8)));
        this.myframe = myframe;

    void initialize(){
        JTextField textField = new JTextField("Write something...");        


        JComboBox<String> jComboBox = new JComboBox<String>(new String[] { "abc" });
        jComboBox.setSize(40, 20);

        this.myframe.add(toolbar, BorderLayout.NORTH);

@AndrewThompson As per your link, it means i should not use canvas with Jframe.

I am sharing you the screenshot of the issue:

Why is the combobox options hiding happening, only when i “type” in the JTextField ??
When i do not type anything, the comboboxes open up well 🙁

Apart from changing Canvas to JPanel, is there no other solution ??