Your ProductDatabase is already a JFrame no need to add another one
You are not correctly using the BoxLayout this is not the way it should be used ... use another one it you be easier
JMenuBar can be added anywhere but if you want it in the op you have to use setJMenuBar
Your CreaeANdSHwGui is misleading... do not use a static method to create an instance of a GUI
CODE
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
public class ProductDatabase extends JFrame
{
private JPanel textPanel;
private JPanel buttonPanel;
private JButton searchButton;
private JButton editButton;
private JTextArea textArea;
private JMenuBar menuBar;
private JMenu file;
private JMenu help;
private JMenuItem quit;
private JMenuItem about;
public ProductDatabase()
{
super("Product Database");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLayout(new FlowLayout());
textPanel = new JPanel();
textArea = new JTextArea("Floor Coverings International \n Virginia Beach");
textPanel.add(textArea);
add(textPanel);
buttonPanel = new JPanel();
searchButton = new JButton("Search");
searchButton.setVerticalTextPosition(AbstractButton.CENTER);
searchButton.setHorizontalTextPosition(AbstractButton.LEADING);
editButton = new JButton("Edit");
editButton.setVerticalTextPosition(AbstractButton.CENTER);
editButton.setHorizontalTextPosition(AbstractButton.TRAILING);
buttonPanel.add(searchButton);
buttonPanel.add(editButton);
add(buttonPanel);
menuBar = new JMenuBar();
file = new JMenu("File");
menuBar.add(file);
quit = new JMenuItem("Quit");
file.add(quit);
help = new JMenu("Help");
menuBar.add(help);
about = new JMenuItem("About");
help.add(about);
setJMenuBar(menuBar);
setSize(400,400);
setVisible(true);
}
public static void main(String[] args)
{
javax.swing.SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
ProductDatabase pd = new ProductDatabase();
}
});
}
}
Good luck