/*Programmer: Norfe R Gregorio *Date started: March 13, 2009 *Date ended: March 19, 2009 *Title:CombinationLock *Description:a program tht will result other frame color if the user will click three buttons that the program have*;
public class CombinationLock extends JFrame {
public static void main (String [] args) { new CombinationLock().setVisible(true); }
public CombinationLock () {
Container ComLock = getContentPane(); cp.setLayout(new FlowLayout());
ComLock.add(new JButton("0")); ComLock.add(new JButton("1")); ComLock.add(new JButton("2")); ComLock.add(new JButton("3")); ComLock.add(new JButton("4")); ComLock.add(new JButton("5")); ComLock.add(new JButton("6")); ComLock.add(new JButton("7")); ComLock.add(new JButton("8")); ComLock.add(new JButton("9")); ComLock.setBackground(Color.white); pack();
}}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment