Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   grid and fractions (http://www.go4expert.com/forums/grid-and-fractions-t27930/)

bouki 2Mar2012 01:01

grid and fractions
I have created a 3*3 grid using buttons but i want to hide the items that is stored in the buttons and have the user click on a button to reveal a fraction. If the user find two match then the program tally a score.

How do i implement this?


class RayFractions extends JFrame implements ActionListener, ItemListener {

  JButton one = new JButton.("1/2");
  JButton two = new JButton("2/4");
  JButton three = new JButton("3/9");
  JButton four = new JButton("4/8");
  JButton five = new JButton("5/6");
  JButton six = new JButton("6/9");
  JButton seven = new JButton("7/5");
  JButton eight = new JButton("8/8");
  JButton nine = new JButton("4/9");

All times are GMT +5.5. The time now is 09:57.