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);
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);
Add your canvas into contentpane,
this.getContentPane().add(canvas,BorderLayout.CENTER);