-4

So I have a frame, inside the frame there are tabs. I tried to put Jbutton outside of the tab but it wouldn't recognize my Jbutton. I keep on getting

error: Cant find symbol.

I don't understand why that happened. Would someone explain?

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.awt.Color;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.net.URL;
import javax.imageio.ImageIO;
import javax.swing.border.*;
import javax.swing.JScrollBar;
import javax.swing.JScrollPane;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException; 

public class menu extends JFrame implements ActionListener{  

JFrame f; 

public menu()
{   f=new JFrame();

JPanel p0 = new JPanel(); p0.setBackground(Color.WHITE);
JPanel p01 = new JPanel(); p01.setBackground(Color.WHITE);
JPanel p01_0 = new JPanel(); p01_0.setBackground(Color.WHITE);
JPanel p01_2 = new JPanel(); p01_2.setBackground(Color.WHITE);
JPanel p01_3 =new JPanel(); p01_3.setBackground(Color.WHITE);
JPanel p01_4 =new JPanel(); p01_4.setBackground(Color.WHITE);
JPanel p01_5 =new JPanel(); p01_5.setBackground(Color.WHITE);
JPanel p01A = new JPanel(); p01A.setBackground(Color.WHITE);
JPanel p02 = new JPanel();  p02.setBackground(Color.WHITE);
JPanel p03 = new JPanel();  p03.setBackground(Color.WHITE);

JPanel p1=new JPanel();
p1.setBackground(Color.WHITE);        
    JPanel p1A=new JPanel();
    p1A.setBackground(Color.WHITE);
        JPanel p1A1=new JPanel(); p1A1.setBackground(Color.WHITE); JPanel 
p1A2=new JPanel(); p1A2.setBackground(Color.WHITE);
        JPanel p1A3=new JPanel(); p1A3.setBackground(Color.WHITE); JPanel 
p1A4=new JPanel(); p1A4.setBackground(Color.WHITE); 
        JPanel p1A5=new JPanel(); p1A5.setBackground(Color.WHITE); JPanel 
p1A6=new JPanel(); p1A6.setBackground(Color.WHITE); 
        JPanel p1A7=new JPanel(); p1A7.setBackground(Color.WHITE); JPanel 
p1A8=new JPanel(); p1A8.setBackground(Color.WHITE); 
        JPanel p1A9=new JPanel(); p1A9.setBackground(Color.WHITE); JPanel 
p1A10=new JPanel(); p1A10.setBackground(Color.WHITE);

JPanel p2=new JPanel();
p2.setBackground(Color.WHITE);
    JPanel p2A=new JPanel();
    p2A.setBackground(Color.WHITE);
        JPanel p2A0=new JPanel(); p2A0.setBackground(Color.WHITE); JPanel 
p2A1=new JPanel(); p2A1.setBackground(Color.WHITE);
        JPanel p2A2=new JPanel(); p2A2.setBackground(Color.WHITE); JPanel 
p2A3=new JPanel(); p2A3.setBackground(Color.WHITE);
        JPanel p2A4=new JPanel(); p2A4.setBackground(Color.WHITE); JPanel 
p2A5=new JPanel(); p2A5.setBackground(Color.WHITE);
        JPanel p2A6=new JPanel(); p2A6.setBackground(Color.WHITE); JPanel 
p2A7=new JPanel(); p2A7.setBackground(Color.WHITE);
        JPanel p2A8=new JPanel(); JPanel p2A9=new JPanel(); JPanel p2A10=new 
JPanel(); JPanel p2A11=new JPanel();

JPanel p3=new JPanel();
p3.setBackground(Color.WHITE);
    JPanel p3A=new JPanel();
    p3A.setBackground(Color.WHITE);
        JPanel p3A0=new JPanel(); p3A0.setBackground(Color.WHITE); JPanel 
p3A1=new JPanel(); p3A1.setBackground(Color.WHITE);
        JPanel p3A2=new JPanel(); p3A2.setBackground(Color.WHITE); JPanel 
p3A3=new JPanel(); p3A3.setBackground(Color.WHITE);
        JPanel p3A4=new JPanel(); p3A4.setBackground(Color.WHITE);JPanel 
p3A5=new JPanel(); p3A5.setBackground(Color.WHITE);
        JPanel p3A6=new JPanel(); p3A6.setBackground(Color.WHITE);JPanel 
p3A7=new JPanel(); p3A7.setBackground(Color.WHITE);

JPanel p4=new JPanel();
p4.setBackground(Color.WHITE);
    JPanel p4A=new JPanel();
    p4A.setBackground(Color.WHITE);
        JPanel p4A0=new JPanel(); p4A0.setBackground(Color.WHITE); JPanel 
p4A1=new JPanel(); p4A1.setBackground(Color.WHITE); JPanel p4A11=new 
JPanel(); p4A11.setBackground(Color.WHITE);
        JPanel p4A2=new JPanel(); p4A2.setBackground(Color.WHITE); JPanel 
p4A3=new JPanel(); p4A3.setBackground(Color.WHITE); 
        JPanel p4A4=new JPanel(); p4A4.setBackground(Color.WHITE); JPanel 
p4A5=new JPanel(); p4A5.setBackground(Color.WHITE);
        JPanel p4A6=new JPanel(); p4A6.setBackground(Color.WHITE); JPanel 
p4A7=new JPanel(); p4A7.setBackground(Color.WHITE);
    JPanel p4B=new JPanel();
    p4B.setBackground(Color.WHITE);
        JPanel p4B11=new JPanel(); p4B11.setBackground(Color.WHITE); JPanel 
p4B1=new JPanel(); p4B1.setBackground(Color.WHITE); JPanel p4B2=new 
JPanel(); p4B2.setBackground(Color.WHITE);
        JPanel p4B3=new JPanel(); p4B3.setBackground(Color.WHITE); JPanel 
p4B4=new JPanel(); p4B4.setBackground(Color.WHITE);
        JPanel p4B5=new JPanel(); p4B5.setBackground(Color.WHITE);
    JPanel p4C=new JPanel();
    p4C.setBackground(Color.WHITE);
    JPanel p4D=new JPanel();
    p4D.setBackground(Color.WHITE);
        JPanel p4D11=new JPanel(); p4D11.setBackground(Color.WHITE); JPanel 
p4D1=new JPanel(); p4D1.setBackground(Color.WHITE);
        JPanel p4D2=new JPanel(); p4D2.setBackground(Color.WHITE);
        JPanel p4F=new JPanel(); p4F.setBackground(Color.WHITE);

Font myFontResta = new Font ( "AR DARLING",Font.BOLD, 60);
Font detailfont = new Font ( "Century Gothic", Font.BOLD, 25);
Font mealfont = new Font ( "Century Gothic", Font.BOLD, 20);
Font drinksfont = new Font ( "Century Gothic", Font.BOLD, 20);
Font drinksfont2 = new Font ( "Century Gothic", Font.BOLD, 25);

LineBorder lineBorder1=new LineBorder(Color.BLACK);
LineBorder lineBorder2=new LineBorder(Color.BLACK);
LineBorder lineBorder3=new LineBorder(Color.BLACK);

JTabbedPane tp = new JTabbedPane();
tp.setFont( new Font( "Century Gothic", Font.BOLD, 24 ) );
tp.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);

JLabel logo1 = new JLabel(new ImageIcon("wotakoi.png"));
JLabel RName1 = new JLabel("Restaurant");
JLabel table = new JLabel("Table's Number :");
JTextField number = new JTextField(" " ,10);
JLabel Detail = new JLabel("Order Detail");
JLabel food = new JLabel("Food(s) :");
JTextField FoodList = new JTextField(" ",20);
JLabel drnk = new JLabel("Drink(s) :");
JTextField DrinkList = new JTextField(" ",20);
JLabel Price = new JLabel("Total Price :"); 
JTextField total = new JTextField(" ",20);
JLabel space1 = new JLabel(" "); JLabel space2 = new JLabel(" "); JLabel 
space3 = new JLabel(" "); JLabel space4 = new JLabel(" ");
JLabel space5 = new JLabel(" "); JLabel space6 = new JLabel(" "); JLabel 
space7 = new JLabel(" "); JLabel space8 = new JLabel(" ");
JLabel space9 = new JLabel(" "); JLabel space10 = new JLabel(" ");

JButton confirm = new JButton("Confirm Order");
confirm.setBackground(Color.GREEN);
confirm.setContentAreaFilled(false);
confirm.setOpaque(true);

JButton reset = new JButton("Reset");
reset.setBackground(Color.RED);
reset.setContentAreaFilled(false);
reset.setOpaque(true);

JButton home = new JButton("Select Table");



//WESTERN
ImageIcon bburger = new ImageIcon("wotakoi.png");
JLabel BBURGER = new JLabel(bburger);
JButton BBURGERp1 = new JButton("+");
BBURGERp1.setBackground(Color.WHITE);
BBURGERp1.setContentAreaFilled(false);
BBURGERp1.setOpaque(true);
JTextField tf22 = new JTextField(" ",2);
JButton BBURGERm1 = new JButton("-");
BBURGERm1.setBackground(Color.WHITE);
BBURGERm1.setContentAreaFilled(false);
BBURGERm1.setOpaque(true);

ImageIcon cburger = new ImageIcon("wotakoi.png");
JLabel CBURGER = new JLabel(cburger);
JButton CBURGERp1 = new JButton("+");
CBURGERp1.setBackground(Color.WHITE);
CBURGERp1.setContentAreaFilled(false);
CBURGERp1.setOpaque(true);
JTextField tf23 = new JTextField(" ",2);
JButton CBURGERm1 = new JButton("-");
CBURGERm1.setBackground(Color.WHITE);
CBURGERm1.setContentAreaFilled(false);
CBURGERm1.setOpaque(true);

ImageIcon bchop = new ImageIcon("wotakoi.png");
JLabel BCHOP = new JLabel(bchop);
JButton BCHOPp1 = new JButton("+");
BCHOPp1.setBackground(Color.WHITE);
BCHOPp1.setContentAreaFilled(false);
BCHOPp1.setOpaque(true);
JTextField tf24 = new JTextField(" ",2);
JButton BCHOPm1 = new JButton("-");
BCHOPm1.setBackground(Color.WHITE);
BCHOPm1.setContentAreaFilled(false);
BCHOPm1.setOpaque(true);

ImageIcon cchop = new ImageIcon("wotakoi.png");
JLabel CCHOP = new JLabel(cchop);
JButton CCHOPp1 = new JButton("+");
CCHOPp1.setBackground(Color.WHITE);
CCHOPp1.setContentAreaFilled(false);
CCHOPp1.setOpaque(true);
JTextField tf25 = new JTextField(" ",2);
JButton CCHOPm1 = new JButton("-");
CCHOPm1.setBackground(Color.WHITE);
CCHOPm1.setContentAreaFilled(false);
CCHOPm1.setOpaque(true);

ImageIcon lchop = new ImageIcon("wotakoi.png");
JLabel LCHOP = new JLabel(lchop);
JButton LCHOPp1 = new JButton("+");
LCHOPp1.setBackground(Color.WHITE);
LCHOPp1.setContentAreaFilled(false);
LCHOPp1.setOpaque(true);
JTextField tf26 = new JTextField(" ",2);
JButton LCHOPm1 = new JButton("-");
LCHOPm1.setBackground(Color.WHITE);
LCHOPm1.setContentAreaFilled(false);
LCHOPm1.setOpaque(true);

ImageIcon spbolognese = new ImageIcon("wotakoi.png");
JLabel SPBOLOGNESE = new JLabel(spbolognese);
JButton SPBOLOGNESEp1 = new JButton("+");
SPBOLOGNESEp1.setBackground(Color.WHITE);
SPBOLOGNESEp1.setContentAreaFilled(false);
SPBOLOGNESEp1.setOpaque(true);
JTextField tf27 = new JTextField(" ",2);
JButton SPBOLOGNESEm1 = new JButton("-");
SPBOLOGNESEm1.setBackground(Color.WHITE);
SPBOLOGNESEm1.setContentAreaFilled(false);
SPBOLOGNESEm1.setOpaque(true);

ImageIcon spcarbonara = new ImageIcon("wotakoi.png");
JLabel SPCARBONARA = new JLabel(spcarbonara);
JButton SPCARBONARAp1 = new JButton("+");
SPCARBONARAp1.setBackground(Color.WHITE);
SPCARBONARAp1.setContentAreaFilled(false);
SPCARBONARAp1.setOpaque(true);
JTextField tf28 = new JTextField(" ",2);
JButton SPCARBONARAm1 = new JButton("-");
SPCARBONARAm1.setBackground(Color.WHITE);
SPCARBONARAm1.setContentAreaFilled(false);
SPCARBONARAm1.setOpaque(true);

//DRINKS

JLabel drinkspace1=new JLabel(" ");
JLabel drinkspace2=new JLabel(" ");
JLabel drinkspace3=new JLabel(" ");

JLabel hotOrcold = new JLabel("Choose Hot or Cold");

JLabel tea = new JLabel("Tea           ");
JLabel spacetea = new JLabel("         ");
JLabel spacetea2 = new JLabel("         ");
//Tea RadioButton
JRadioButton hottea = new JRadioButton("Hot");
hottea.setBackground(Color.WHITE);
hottea.setContentAreaFilled(false);
hottea.setOpaque(true);
JRadioButton coldtea = new JRadioButton("Cold");
coldtea.setBackground(Color.WHITE);
coldtea.setContentAreaFilled(false);
coldtea.setOpaque(true);
//Tea PLUS MINUS Button
JButton teap1 = new JButton("+");
teap1.setBackground(Color.WHITE);
teap1.setContentAreaFilled(false);
teap1.setOpaque(true);
JTextField tf29 = new JTextField(" ",2);
JButton team1 = new JButton("-");
team1.setBackground(Color.WHITE);
team1.setContentAreaFilled(false);
team1.setOpaque(true);
//Tea Group
ButtonGroup teagroup = new ButtonGroup();
teagroup.add(hottea);
teagroup.add(coldtea);

JLabel coffee = new JLabel("Coffee     ");
JLabel spacecoffee = new JLabel("         ");
JLabel spacecoffee2 = new JLabel("         ");
//Coffee RadioButton
JRadioButton hotcoffee = new JRadioButton("Hot");
hotcoffee.setBackground(Color.WHITE);
hotcoffee.setContentAreaFilled(false);
hotcoffee.setOpaque(true);
JRadioButton coldcoffee = new JRadioButton("Cold");
coldcoffee.setBackground(Color.WHITE);
coldcoffee.setContentAreaFilled(false);
coldcoffee.setOpaque(true);
//Coffee PLUS MINUS Button
JButton coffeep1 = new JButton("+");
coffeep1.setBackground(Color.WHITE);
coffeep1.setContentAreaFilled(false);
coffeep1.setOpaque(true);
JTextField tf30 = new JTextField(" ",2);
JButton coffeem1 = new JButton("-");
coffeem1.setBackground(Color.WHITE);
coffeem1.setContentAreaFilled(false);
coffeem1.setOpaque(true);
//Coffee Group
ButtonGroup coffeegroup = new ButtonGroup();
coffeegroup.add(hotcoffee);
coffeegroup.add(coldcoffee);

JLabel cocoa = new JLabel("Cocoa     ");
JLabel spacecocoa = new JLabel("         ");
JLabel spacecocoa2 = new JLabel("         ");
//Cocoa RadioButton
JRadioButton hotcocoa = new JRadioButton("Hot");
hotcocoa.setBackground(Color.WHITE);
hotcocoa.setContentAreaFilled(false);
hotcocoa.setOpaque(true);
JRadioButton coldcocoa = new JRadioButton("Cold");
coldcocoa.setBackground(Color.WHITE);
coldcocoa.setContentAreaFilled(false);
coldcocoa.setOpaque(true);
//Cocoa PLUS MINUS Button
JButton cocoap1 = new JButton("+");
cocoap1.setBackground(Color.WHITE);
cocoap1.setContentAreaFilled(false);
cocoap1.setOpaque(true);
JTextField tf31 = new JTextField(" ",2);
JButton cocoam1 = new JButton("-");
cocoam1.setBackground(Color.WHITE);
cocoam1.setContentAreaFilled(false);
cocoam1.setOpaque(true);
//Cocoa Group
ButtonGroup cocoagroup = new ButtonGroup();
cocoagroup.add(hotcocoa);
cocoagroup.add(coldcocoa);

JLabel nescafe = new JLabel("Nescafe   ");
JLabel spacenescafe = new JLabel("         ");
JLabel spacenescafe2 = new JLabel("         ");
//Nescafe RadioButton
JRadioButton hotnescafe = new JRadioButton("Hot");
hotnescafe.setBackground(Color.WHITE);
hotnescafe.setContentAreaFilled(false);
hotnescafe.setOpaque(true);
JRadioButton coldnescafe = new JRadioButton("Cold");
coldnescafe.setBackground(Color.WHITE);
coldnescafe.setContentAreaFilled(false);
coldnescafe.setOpaque(true);
//Nescafe PLUS MINUS Button
JButton nescafep1 = new JButton("+");
nescafep1.setBackground(Color.WHITE);
nescafep1.setContentAreaFilled(false);
nescafep1.setOpaque(true);
JTextField tf32 = new JTextField(" ",2);
JButton nescafem1 = new JButton("-");
nescafem1.setBackground(Color.WHITE);
nescafem1.setContentAreaFilled(false);
nescafem1.setOpaque(true);
//Nescafe Group
ButtonGroup nescafegroup = new ButtonGroup();
nescafegroup.add(hotnescafe);
nescafegroup.add(coldnescafe);

JLabel milo = new JLabel("Milo          ");
JLabel spacemilo = new JLabel("         ");
JLabel spacemilo2 = new JLabel("         ");
//Milo RadioButton
JRadioButton hotmilo = new JRadioButton("Hot");
hotmilo.setBackground(Color.WHITE);
hotmilo.setContentAreaFilled(false);
hotmilo.setOpaque(true);
JRadioButton coldmilo = new JRadioButton("Cold");
coldmilo.setBackground(Color.WHITE);
coldmilo.setContentAreaFilled(false);
coldmilo.setOpaque(true);
//Milo PLUS MINUS Button
JButton milop1 = new JButton("+");
milop1.setBackground(Color.WHITE);
milop1.setContentAreaFilled(false);
milop1.setOpaque(true);
JTextField tf33 = new JTextField(" ",2);
JButton milom1 = new JButton("-");
milom1.setBackground(Color.WHITE);
milom1.setContentAreaFilled(false);
milom1.setOpaque(true);
//Milo Group
ButtonGroup milogroup = new ButtonGroup();
milogroup.add(hotmilo);
milogroup.add(coldmilo);

JLabel greentea = new JLabel("Green Tea");
JLabel spacegreentea = new JLabel("         ");
JLabel spacegreentea2 = new JLabel("         ");
//Greentea RadioButton
JRadioButton hotgreentea = new JRadioButton("Hot");
hotgreentea.setBackground(Color.WHITE);
hotgreentea.setContentAreaFilled(false);
hotgreentea.setOpaque(true);
JRadioButton coldgreentea = new JRadioButton("Cold");
coldgreentea.setBackground(Color.WHITE);
coldgreentea.setContentAreaFilled(false);
coldgreentea.setOpaque(true);
//Greentea PLUS MINUS Button
JButton greenteap1 = new JButton("+");
greenteap1.setBackground(Color.WHITE);
greenteap1.setContentAreaFilled(false);
greenteap1.setOpaque(true);
JTextField tf34 = new JTextField(" ",2);
JButton greenteam1 = new JButton("-");
greenteam1.setBackground(Color.WHITE);
greenteam1.setContentAreaFilled(false);
greenteam1.setOpaque(true);
//Greentea Group
ButtonGroup greenteagroup = new ButtonGroup();
greenteagroup.add(hotgreentea);
greenteagroup.add(coldgreentea);

//Juice
JLabel juice = new JLabel("Juice");
JLabel spacejuice = new JLabel(" ");

JLabel orangejuice = new JLabel("Orang Juice    ");
JLabel spaceorangejuice = new JLabel("          ");
JLabel spaceorangejuice2 = new JLabel("         ");
//Orange Juice PLUS MINUS Button
JButton orangejuicep1 = new JButton("+");
orangejuicep1.setBackground(Color.WHITE);
orangejuicep1.setContentAreaFilled(false);
orangejuicep1.setOpaque(true);
JTextField tf35 = new JTextField(" ",2);
JButton orangejuicem1 = new JButton("-");
orangejuicem1.setBackground(Color.WHITE);
orangejuicem1.setContentAreaFilled(false);
orangejuicem1.setOpaque(true);

JLabel lemonade = new JLabel("Lamonade      ");
JLabel spacelemonade = new JLabel("          ");
JLabel spacelemonade2 = new JLabel("         ");
//Lemonade PLUS MINUS Button
JButton lemonadep1 = new JButton("+");
lemonadep1.setBackground(Color.WHITE);
lemonadep1.setContentAreaFilled(false);
lemonadep1.setOpaque(true);
JTextField tf36 = new JTextField(" ",2);
JButton lemonadem1 = new JButton("-");
lemonadem1.setBackground(Color.WHITE);
lemonadem1.setContentAreaFilled(false);
lemonadem1.setOpaque(true);

JLabel applejuice = new JLabel("Apple Juice    ");
JLabel spaceapplejuice = new JLabel("          ");
JLabel spaceapplejuice2 = new JLabel("         ");
//Apple Juice PLUS MINUS Button
JButton applejuicep1 = new JButton("+");
applejuicep1.setBackground(Color.WHITE);
applejuicep1.setContentAreaFilled(false);
applejuicep1.setOpaque(true);
JTextField tf37 = new JTextField(" ",2);
JButton applejuicem1 = new JButton("-");
applejuicem1.setBackground(Color.WHITE);
applejuicem1.setContentAreaFilled(false);
applejuicem1.setOpaque(true);

JLabel bananajuice = new JLabel("Banana Juice ");
JLabel spacebananajuice = new JLabel("          ");
JLabel spacebananajuice2 = new JLabel("         ");
//Banana Juice PLUS MINUS Button
JButton bananajuicep1 = new JButton("+");
bananajuicep1.setBackground(Color.WHITE);
bananajuicep1.setContentAreaFilled(false);
bananajuicep1.setOpaque(true);
JTextField tf38 = new JTextField(" ",2);
JButton bananajuicem1 = new JButton("-");
bananajuicem1.setBackground(Color.WHITE);
bananajuicem1.setContentAreaFilled(false);
bananajuicem1.setOpaque(true);

//Ice Shave

JLabel iceshave = new JLabel("Ice Shave");
JLabel spaceiceshave = new JLabel(" ");

JLabel cendolfloat = new JLabel("Ice Shave Cendol Float ");
JLabel spacecendolfloat = new JLabel("          ");
JLabel spacecendolfloat2 = new JLabel("         ");
//Cendol Float PLUS MINUS Button
JButton cendolfloatp1 = new JButton("+");
cendolfloatp1.setBackground(Color.WHITE);
cendolfloatp1.setContentAreaFilled(false);
cendolfloatp1.setOpaque(true);
JTextField tf39 = new JTextField(" ",2);
JButton cendolfloatm1 = new JButton("-");
cendolfloatm1.setBackground(Color.WHITE);
cendolfloatm1.setContentAreaFilled(false);
cendolfloatm1.setOpaque(true);

f.setLayout(new BorderLayout());
p0.add(logo1); p0.add(RName1);
RName1.setFont(myFontResta);
RName1.setForeground(Color.BLUE);

p02.setLayout(new BorderLayout());

p01_0.add(Detail);
Detail.setFont(detailfont);
Detail.setForeground(Color.BLACK);

p01_2.setLayout(new GridLayout(11,2));
p01_2.add(table);
table.setFont(mealfont);
table.setForeground(Color.BLACK);
p01_2.add(number);
p01_2.add(space1);p01_2.add(space2);

p01_2.add(food);
food.setFont(mealfont);
food.setForeground(Color.BLACK);
p01_2.add(FoodList);
p01_2.add(space3);p01_2.add(space4);

p01_2.add(drnk);
drnk.setFont(mealfont);
drnk.setForeground(Color.BLACK);
p01_2.add(DrinkList);
p01_2.add(space5);p01_2.add(space6);

p01_2.add(Price);
Price.setFont(mealfont);
Price.setForeground(Color.BLACK);
p01_2.add(total);

p01_2.add(space7); p01_2.add(space8);
p01_2.add(space9); p01_2.add(space10);

p03.add(p01_2);

p02.add(p01_0, BorderLayout.NORTH);
p02.add(p03, BorderLayout.CENTER);
p01_4.add(confirm); 
p01_4.add(reset);
p01_2.add(p01_4);   



//TAB 2 = Noodles
    tp.add(new JScrollPane(p2),"Noodles");

    p2A.setLayout(new GridLayout(11,1));

    p2A1.add(MB); p2A1.add(MBp1); p2A1.add(tf11); p2A1.add(MBm1);
    p2A2.add(MGB); p2A2.add(MGBp1); p2A2.add(tf12); p2A2.add(MGBm1);
    p2A3.add(MH); p2A3.add(MHp1); p2A3.add(tf13); p2A3.add(MHm1); 
    p2A4.add(MK); p2A4.add(MKp1); p2A4.add(tf14); p2A4.add(MKm1);
    p2A5.add(MR); p2A5.add(MRp1); p2A5.add(tf15); p2A5.add(MRm1);
    p2A6.add(MS); p2A6.add(MSp1); p2A6.add(tf16); p2A6.add(MSm1);
    p2A7.add(MTY); p2A7.add(MTYp1); p2A7.add(tf17); p2A7.add(MTYm1);
    p2A8.add(BG); p2A8.add(BGp1); p2A8.add(tf18); p2A8.add(BGm1);
    p2A9.add(BGS); p2A9.add(BGSp1); p2A9.add(tf19); p2A9.add(BGSm1);
    p2A10.add(BS); p2A10.add(BSp1); p2A10.add(tf20); p2A10.add(BSm1);
    p2A11.add(BTY); p2A11.add(BTYp1); p2A11.add(tf21); p2A11.add(BTYm1);

    p2A.add(p2A1); p2A.add(p2A2); p2A.add(p2A3); p2A.add(p2A4); p2A.add(p2A5); p2A.add(p2A6);
    p2A.add(p2A7); p2A.add(p2A8); p2A.add(p2A9); p2A.add(p2A10); p2A.add(p2A11);

    p2.setLayout(new BorderLayout());
    p2.add(p2A, BorderLayout.CENTER);

//TAB 3 = Western
    tp.add(new JScrollPane(p3),"Western");

    p3A.setLayout(new GridLayout(7,1));

    p3A1.add(BBURGER); p3A1.add(BBURGERp1); p3A1.add(tf22); 
p3A1.add(BBURGERm1);
    p3A2.add(CBURGER); p3A2.add(CBURGERp1); p3A2.add(tf23); 
p3A2.add(CBURGERm1);
    p3A3.add(BCHOP); p3A3.add(BCHOPp1); p3A3.add(tf24); p3A3.add(BCHOPm1); 
    p3A4.add(CCHOP); p3A4.add(CCHOPp1); p3A4.add(tf25); p3A4.add(CCHOPm1);
    p3A5.add(LCHOP); p3A5.add(LCHOPp1); p3A5.add(tf26); p3A5.add(LCHOPm1);
    p3A6.add(SPBOLOGNESE); p3A6.add(SPBOLOGNESEp1); p3A6.add(tf27); 
p3A6.add(SPBOLOGNESEm1);
    p3A7.add(SPCARBONARA); p3A7.add(SPCARBONARAp1); p3A7.add(tf28); 
p3A7.add(SPCARBONARAm1);

    p3A.add(p3A1); p3A.add(p3A2); p3A.add(p3A3); p3A.add(p3A4); 
p3A.add(p3A5); p3A.add(p3A6);
    p3A.add(p3A7);

    p3.setLayout(new BorderLayout());
    p3.add(p3A, BorderLayout.CENTER);

//TAB 4 = Drinks 
    tp.add(new JScrollPane(p4),"Drinks");
    p4.setLayout(new BorderLayout());

    p4A.setLayout(new GridLayout(8,1));
    p4A11.add(hotOrcold);
    hotOrcold.setFont(drinksfont2);
    p4A1.add(tea); p4A1.add(spacetea); p4A1.add(hottea); p4A1.add(coldtea); 
p4A1.add(spacetea2); p4A1.add(teap1); p4A1.add(tf29); p4A1.add(team1);
    tea.setFont(drinksfont);
    p4A2.add(coffee); p4A2.add(spacecoffee); p4A2.add(hotcoffee); 
p4A2.add(coldcoffee); p4A2.add(spacecoffee2); p4A2.add(coffeep1); 
p4A2.add(tf30); p4A2.add(coffeem1);
    coffee.setFont(drinksfont);
    p4A3.add(cocoa); p4A3.add(spacecocoa); p4A3.add(hotcocoa); 
p4A3.add(coldcocoa); p4A3.add(spacecocoa2); p4A3.add(cocoap1); 
p4A3.add(tf31); p4A3.add(cocoam1);
    cocoa.setFont(drinksfont);
    p4A4.add(nescafe); p4A4.add(spacenescafe); p4A4.add(hotnescafe); 
p4A4.add(coldnescafe); p4A4.add(spacenescafe2); p4A4.add(nescafep1); 
p4A4.add(tf32); p4A4.add(nescafem1);
    nescafe.setFont(drinksfont);
    p4A5.add(milo); p4A5.add(spacemilo); p4A5.add(hotmilo); 
p4A5.add(coldmilo); p4A5.add(spacemilo2); p4A5.add(milop1); p4A5.add(tf33); 
p4A5.add(milom1);
    milo.setFont(drinksfont);
    p4A6.add(greentea); p4A6.add(spacegreentea); p4A6.add(hotgreentea); 
p4A6.add(coldgreentea); p4A6.add(spacegreentea2); p4A6.add(greenteap1); 
p4A6.add(tf34); p4A6.add(greenteam1);
    greentea.setFont(drinksfont);

    p4A7.add(drinkspace1);

    p4A.add(p4A11); p4A.add(p4A1); p4A.add(p4A2); p4A.add(p4A3); 
p4A.add(p4A4); p4A.add(p4A5); p4A.add(p4A6); p4A.add(p4A7);
    p4A11.setBorder(lineBorder1); p4A1.setBorder(lineBorder1); 
p4A2.setBorder(lineBorder1); p4A3.setBorder(lineBorder1); 
    p4A4.setBorder(lineBorder1); p4A5.setBorder(lineBorder1); 
p4A6.setBorder(lineBorder1);

    //JUICE
    p4C.setLayout(new BorderLayout());
    p4B.setLayout(new BorderLayout());
    p4D.setLayout(new BorderLayout());
    p4F.setLayout(new BorderLayout());
    p4B.setLayout(new GridLayout(6,1));

    p4B11.add(juice); juice.setFont(drinksfont2);

    p4B1.add(orangejuice); orangejuice.setFont(drinksfont); 
    p4B1.add(spaceorangejuice); spaceorangejuice.setFont(drinksfont); 
p4B1.add(spaceorangejuice2); spaceorangejuice2.setFont(drinksfont);
    p4B1.add(orangejuicep1); p4B1.add(tf35); p4B1.add(orangejuicem1);

    p4B2.add(lemonade); lemonade.setFont(drinksfont);
    p4B2.add(spacelemonade); spacelemonade.setFont(drinksfont); 
p4B2.add(spacelemonade2); spacelemonade2.setFont(drinksfont);
    p4B2.add(lemonadep1); p4B2.add(tf36); p4B2.add(lemonadem1);

    p4B3.add(applejuice); applejuice.setFont(drinksfont);
    p4B3.add(spaceapplejuice); spaceapplejuice.setFont(drinksfont); 
p4B3.add(spaceapplejuice2); spaceapplejuice2.setFont(drinksfont);
    p4B3.add(applejuicep1); p4B3.add(tf37); p4B3.add(applejuicem1);

    p4B4.add(bananajuice); bananajuice.setFont(drinksfont);
    p4B4.add(spacebananajuice); spacebananajuice.setFont(drinksfont); 
p4B4.add(spacebananajuice2); spacebananajuice2.setFont(drinksfont);
    p4B4.add(bananajuicep1); p4B4.add(tf38); p4B4.add(bananajuicem1);

    p4B5.add(drinkspace2);

    p4B.add(p4B11); p4B.add(p4B1); p4B.add(p4B2); p4B.add(p4B3); 
p4B.add(p4B4); p4B.add(p4B5);
    p4B11.setBorder(lineBorder1); p4B1.setBorder(lineBorder1); 
p4B2.setBorder(lineBorder1); p4B3.setBorder(lineBorder1); 
p4B4.setBorder(lineBorder1);

    //Ice Shave
    p4D.setLayout(new GridLayout(3,1));

    p4D11.add(iceshave); iceshave.setFont(drinksfont2);

    p4D1.add(cendolfloat); cendolfloat.setFont(drinksfont); 
    p4D1.add(spacecendolfloat);  
    p4D1.add(cendolfloatp1); p4D1.add(tf39); p4D1.add(cendolfloatm1);

    p4D2.add(drinkspace3);

    p4D.add(p4D11); p4D.add(p4D1); p4D.add(p4D2);
    p4D11.setBorder(lineBorder1); p4D1.setBorder(lineBorder1);
    p4F.add(p4D);

    p4.add(p4A, BorderLayout.WEST);
    p4.add(p4C, BorderLayout.SOUTH);
    p4C.add(p4B, BorderLayout.WEST);
    p4C.add(p4F, BorderLayout.SOUTH);
    p4F.add(p4D, BorderLayout.WEST);

    f.add(p0, BorderLayout.NORTH);
    f.add(p02, BorderLayout.CENTER);     
    f.add(tp, BorderLayout.WEST);
    f.getContentPane().setBackground(Color.WHITE);
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
    f.setSize(980,800);  
    f.setVisible(true);  

        confirm.addActionListener(this);


        BBURGERp1.addActionListener(this); 
BBURGERm1.addActionListener(this);
        CBURGERp1.addActionListener(this); 
CBURGERm1.addActionListener(this);
        BCHOPp1.addActionListener(this); BCHOPm1.addActionListener(this);
        CCHOPp1.addActionListener(this); CCHOPm1.addActionListener(this);
        LCHOPp1.addActionListener(this); LCHOPm1.addActionListener(this);
        SPBOLOGNESEp1.addActionListener(this); 
SPBOLOGNESEm1.addActionListener(this);
        SPCARBONARAp1.addActionListener(this); 
SPCARBONARAm1.addActionListener(this);

        teap1.addActionListener(this); team1.addActionListener(this);
        coffeep1.addActionListener(this); team1.addActionListener(this);
        cocoap1.addActionListener(this); cocoam1.addActionListener(this);
        nescafep1.addActionListener(this); 
nescafem1.addActionListener(this);
        milop1.addActionListener(this); milom1.addActionListener(this);
        greenteap1.addActionListener(this); 
greenteam1.addActionListener(this);
        orangejuicep1.addActionListener(this); 
orangejuicem1.addActionListener(this);
        lemonadep1.addActionListener(this); 
lemonadem1.addActionListener(this);
        applejuicep1.addActionListener(this); 
applejuicem1.addActionListener(this);
        bananajuicep1.addActionListener(this); 
bananajuicem1.addActionListener(this);
        cendolfloatp1.addActionListener(this); 
cendolfloatm1.addActionListener(this);


}
public void actionPerformed (ActionEvent event)
{
Object source = event.getSource();

if(source == confirm)

{   
    seat frame = new seat();
    frame.setTitle("Restaurant Ordering System");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setSize(700,600);
    frame.setVisible(true);
    frame.setLocation(100,100);
}
else
{

}
}
public static void main(String[] args) {

new menu(); 
}
halfer
  • 19,824
  • 17
  • 99
  • 186
  • `if possible ASAP because i need to submit my project tomorrow` - people answer questions when they have time. Your urgency is not relevant to the question and should not be included in the question. You should not be extending a JFrame. I suggest you start by reading the [Swing Tutorial](https://docs.oracle.com/javase/tutorial/uiswing/TOC.html) . There are sections on `How to Use Buttons` or `How to Use a Tabbed Pane` which which will show to be better create your class. `inside the frame there are tabs` - I don't see any tabs. I have no idea what you are talking about. – camickr Oct 21 '18 at 03:22
  • *"if possible ASAP because i need to submit my project tomorrow."* This does not work the way you might like, it actually causes the question to get **less** attention and to discourage people from trying to answer. – Andrew Thompson Oct 21 '18 at 03:22
  • Well that code is even worse. Andrew took the time to properly format the code to make it readable, then you just overwrite the changes to add unformatted code. Class names SHOULD start with an upper case character. Variable names should NOT start with an upper case character. Way too much code to read. – camickr Oct 21 '18 at 03:28
  • 1
    *"I don't understand why that happened."* See [What does a “Cannot find symbol” compilation error mean?](https://stackoverflow.com/q/25706216/418556) BTW - to [edit] a question use the `edit` link below the question tags! This saves overwriting the edits others have done to make the question more clear. – Andrew Thompson Oct 21 '18 at 03:28
  • thanks for your answer. i have edited the code. sorry. @camickr – user10534892 Oct 21 '18 at 03:30

1 Answers1

2

First of all, your code is a mess. Unreadable. And you are violating a whole lot of style rules, which is going to discourage anyone from trying to read your code.

(And that kind of makes asking people to help you problematic ..... doesn't it!)

Your "Cannot find symbol" errors seem to have a common explanation. Here's the first one:

menu.java:544: error: cannot find symbol
    p2A1.add(MB); p2A1.add(MBp1); p2A1.add(tf11); p2A1.add(MBm1);
             ^
  symbol:   variable MB
  location: class menu

When I trawl through the code, I cannot find any declaration for a variable called MB. Or mb. Or anything resembling this.

The other errors are similar.

Basically, you have either dumped in a bunch of statements that refer to things that are not declared ... or you have somehow managed to lose the declarations.

I don't think there is much we can do you help you with your code. It is ... incomprehensible.

However, if you need to understand the various things that can cause the Java compiler to produce that error message, read this:

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216