Yes you are adding panel to the frame before creating object of JPanel. Anyway change your constructor with this:
public Executer() {
JFrame frame = new JFrame("Execute Script");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(900, 400);
MyPanel();
Text();
Buttons();
Fields();
frame.add(panel);
frame.setVisible(true);
}
thanks.