tags:

views:

44

answers:

1

When adding my canvas in JFrame Menu, why my menu always hide behind my canvas?

    canvas = new MyCanvas();
    canvas.setBackground(Color.lightGray);

    contain.add(canvas, BorderLayout.CENTER);
+1  A: 

Add your canvas into contentpane,

this.getContentPane().add(canvas,BorderLayout.CENTER);
adatapost