import java.awt.*;
import javax.swing;
public class ATMko extends JFrame
{
JPanel p1;
JButton b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14;
JTextField t1;
Container c= getContentPane();
public ATMko()
{
t1=new JTextField(" ",100);
b1=new JButton("1");
b1.setBackground(Color.GRAY);
b1.setForeground(Color.BLACK);
b2=new JButton("2");
b2.setBackground(Color.GRAY);
b2.setForeground(Color.BLACK);
b3=new JButton("3");
b3.setBackground(Color.GRAY);
b3.setForeground(Color.BLACK);
b4=new JButton("4");
b4.setBackground(Color.GRAY);
b4.setForeground(Color.BLACK);
b5=new JButton("5");
b5.setBackground(Color.GRAY);
b5.setForeground(Color.BLACK);
b6=new JButton("6");
b6.setBackground(Color.GRAY);
b6.setForeground(Color.BLACK);
b7=new JButton("7");
b7.setBackground(Color.GRAY);
b7.setForeground(Color.BLACK);
b8=new JButton("8");
b8.setBackground(Color.GRAY);
b8.setForeground(Color.BLACK);
b9=new JButton("9");
b9.setBackground(Color.GRAY);
b9.setForeground(Color.BLACK);
b10= new JButton("0");
b10.setBackground(Color.GRAY);
b10.setForeground(Color.BLACK);
b11=new JButton("END");
b11.setBackground(Color.RED);
b11.setForeground(Color.BLACK);
b12=new JButton("Enter");
b12.setBackground(Color.GREEN);
b12.setforeground(Color.BLACK);
b13=new JButton("Cancel");
b13.setBackground(Color.YELLOW);
b13.setforeground(Color.BLACK);
b14=new JButton("000");
b14.setBackground(Color.GRAY);
b14.setforeground(Color.BLUE);
c.setLayout(new GridLayout());
b1.setBounds(50,50,20,20);
b2.setBounds(50,50,20,20);
b3.setBounds(50,50,20,20);
b4.setBounds(50,50,20,20);
b5.setBounds(50,50,20,20);
b6.setBounds(50,50,20,20);
b7.setBounds(50,50,20,20);
b8.setBounds(50,50,20,20);
b9.setBounds(50,50,20,20);
b10.setBounds(50,50,20,20);
b11.setBounds(50,60,20,20);
b12.setBounds(50,60,20,20);
b13.setBounds(50,60,20,20);
b14.setBounds(50,60,20,20);
p1.setLayout(new GridLayout());
p1.add(b1);p1.add(b2);
p1.add(b3);p1.add(b4);
p1.add(b5);p1.add(b6);
p1.add(b7);p1.add(b8);
p1.add(b9);p1.add(b10);
p1.add(b11);p1.add(b12);
p1.add(b13);p1.add(b14);
setSize(500,600);
show();
}
public static void main(String[]args)
{
new ATMko();
}
}
This is my errors:
--------------------Configuration: <Default>--------------------
C:\Documents and Settings\Rein\My Documents\ATMko.java:2: package javax does not exist
import javax.swing;
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:5: cannot find symbol
symbol: class JFrame
public class ATMko extends JFrame
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:7: cannot find symbol
symbol : class JPanel
location: class ATMko
JPanel p1;
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:8: cannot find symbol
symbol : class JButton
location: class ATMko
JButton b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14;
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:9: cannot find symbol
symbol : class JTextField
location: class ATMko
JTextField t1;
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:10: cannot find symbol
symbol : method getContentPane()
location: class ATMko
Container c= getContentPane();
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:13: cannot find symbol
symbol : class JTextField
location: class ATMko
t1=new JTextField(" ",100);
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:14: cannot find symbol
symbol : class JButton
location: class ATMko
b1=new JButton("1");
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:17: cannot find symbol
symbol : class JButton
location: class ATMko
b2=new JButton("2");
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:20: cannot find symbol
symbol : class JButton
location: class ATMko
b3=new JButton("3");
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:23: cannot find symbol
symbol : class JButton
location: class ATMko
b4=new JButton("4");
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:26: cannot find symbol
symbol : class JButton
location: class ATMko
b5=new JButton("5");
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:29: cannot find symbol
symbol : class JButton
location: class ATMko
b6=new JButton("6");
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:32: cannot find symbol
symbol : class JButton
location: class ATMko
b7=new JButton("7");
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:35: cannot find symbol
symbol : class JButton
location: class ATMko
b8=new JButton("8");
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:38: cannot find symbol
symbol : class JButton
location: class ATMko
b9=new JButton("9");
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:41: cannot find symbol
symbol : class JButton
location: class ATMko
b10= new JButton("0");
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:44: cannot find symbol
symbol : class JButton
location: class ATMko
b11=new JButton("END");
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:47: cannot find symbol
symbol : class JButton
location: class ATMko
b12=new JButton("Enter");
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:50: cannot find symbol
symbol : class JButton
location: class ATMko
b13=new JButton("Cancel");
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:53: cannot find symbol
symbol : class JButton
location: class ATMko
b14=new JButton("000");
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:82: cannot find symbol
symbol : method setSize(int,int)
location: class ATMko
setSize(500,600);
^
C:\Documents and Settings\Rein\My Documents\ATMko.java:83: cannot find symbol
symbol : method show()
location: class ATMko
show();
^
23 errors
Process completed.
i need help it will be pass in 2 hours from now please reply