You're creating a second grading in the child class, rather than accessing the parent class.
Try replacing the lines:
grading gr=new grading();
JOptionPane.showMessageDialog(null,(gr.me)+" is me from child");
with
JOptionPane.showMessageDialog(null,(frame.me)+" is me from child");