My GUI doesn't work

Hello I wanted to make a java code that just makes a gui that show a window with a button but it has one error with the Jpanel I don't know what it is? (

package Calc;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;


    public class App {
        private JButton buttonmsg;
        **private JPanel panelMain;**

        public App() {
            buttonmsg.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    JOptionPane.showMessageDialog(null, "Hello world");
                }
            });
        }

        public static void main(String[] args) {
            JFrame frame = new JFrame("App");
            frame.setContentPane(new App().panelMain);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.setVisible(true);
        }
    }