Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 7 of 7

Thread: Search Word puzzle game

  1. #1
    Junior Member
    Join Date
    Apr 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Search Word puzzle game

    hi, i am new in Java. Im trying to do in Netbeans simple word search game. when you click a button(letter) it will appear in right corner.
    i dont know how to

    private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {
    Attached Images Attached Images


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Search Word puzzle game

    Honest advice? Ditch the GUI builder.

    I'm still not sure what you're trying to do, but perhaps a CardLayout would be your friend? Or maybe just adding the Component from your ActionListener?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Junior Member
    Join Date
    Apr 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Search Word puzzle game

    hi kevin. i am trying to do like a scrabble game. you have to find the words and click on it. in the middle is COOL. you have to click on C - O - O - L and it will appear in the right corner that you found the word.

  4. #4
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Search Word puzzle game

    Quote Originally Posted by lew1s View Post
    hi kevin. i am trying to do like a scrabble game. you have to find the words and click on it. in the middle is COOL. you have to click on C - O - O - L and it will appear in the right corner that you found the word.
    Okay, and what have you tried? Where are you stuck? What works, what doesn't work? How doesn't it work? Be specific. But honestly, we can't really help you until you provide an SSCCE demonstrating what you've done so far.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    Junior Member
    Join Date
    Apr 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Search Word puzzle game

    i really newbie. I dont know how to declare the button in actionPerformed and Listener. Can you give me some example? please

  6. #6

  7. #7
    Junior Member
    Join Date
    Apr 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Search Word puzzle game

    yes, i did it but now i have to implement file. When you find a word it will check in the file if its correct


    package level;

    import javax.swing.*;
    import java.awt.event.*;
    import java.io.File;



    /**
    *
    *
    */
    public class Level extends javax.swing.JFrame
    implements ActionListener {



    public Level() {
    initComponents();

    File words = new File("words.txt");









    }

    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {

    jLayeredPane1 = new javax.swing.JLayeredPane();
    jButton5 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jButton3 = new javax.swing.JButton();
    jButton1 = new javax.swing.JButton();
    jButton4 = new javax.swing.JButton();
    jButton6 = new javax.swing.JButton();
    jButton7 = new javax.swing.JButton();
    jButton8 = new javax.swing.JButton();
    jButton9 = new javax.swing.JButton();
    jButton10 = new javax.swing.JButton();
    jButton18 = new javax.swing.JButton();
    jButton16 = new javax.swing.JButton();
    jButton20 = new javax.swing.JButton();
    jButton17 = new javax.swing.JButton();
    jButton19 = new javax.swing.JButton();
    jButton11 = new javax.swing.JButton();
    jButton12 = new javax.swing.JButton();
    jButton13 = new javax.swing.JButton();
    jButton15 = new javax.swing.JButton();
    jButton14 = new javax.swing.JButton();
    jButton21 = new javax.swing.JButton();
    jButton22 = new javax.swing.JButton();
    jButton23 = new javax.swing.JButton();
    jButton24 = new javax.swing.JButton();
    jButton25 = new javax.swing.JButton();
    clear = new javax.swing.JButton();
    display = new java.awt.TextField();
    jLabel2 = new javax.swing.JLabel();
    jLabel1 = new javax.swing.JLabel();

    setDefaultCloseOperation(javax.swing.WindowConstan ts.EXIT_ON_CLOSE);

    jButton5.setFont(new java.awt.Font("Tahoma", 0, 1)); // NOI18N
    jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/r.png"))); // NOI18N
    jButton5.setText("R");
    jButton5.setHorizontalTextPosition(javax.swing.Swi ngConstants.CENTER);
    jButton5.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton5ActionPerformed(evt);
    }
    });
    jButton5.setBounds(400, 50, 100, 90);
    jLayeredPane1.add(jButton5, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton2.setFont(new java.awt.Font("Tahoma", 0, 1)); // NOI18N
    jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/b.png"))); // NOI18N
    jButton2.setText("B");
    jButton2.setHorizontalTextPosition(javax.swing.Swi ngConstants.CENTER);
    jButton2.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton2ActionPerformed(evt);
    }
    });
    jButton2.setBounds(100, 50, 100, 90);
    jLayeredPane1.add(jButton2, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton3.setFont(new java.awt.Font("Tahoma", 0, 1)); // NOI18N
    jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/c.png"))); // NOI18N
    jButton3.setText("C");
    jButton3.setHorizontalTextPosition(javax.swing.Swi ngConstants.CENTER);
    jButton3.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton3ActionPerformed(evt);
    }
    });
    jButton3.setBounds(200, 50, 100, 90);
    jLayeredPane1.add(jButton3, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton1.setFont(new java.awt.Font("DejaVu Sans", 0, 1));
    jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/s.png"))); // NOI18N
    jButton1.setText("S");
    jButton1.setDebugGraphicsOptions(javax.swing.Debug Graphics.NONE_OPTION);
    jButton1.setHorizontalTextPosition(javax.swing.Swi ngConstants.CENTER);
    jButton1.setMaximumSize(new java.awt.Dimension(323, 309));
    jButton1.setPreferredSize(new java.awt.Dimension(323, 309));
    jButton1.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton1ActionPerformed(evt);
    }
    });
    jButton1.setBounds(0, 50, 100, 90);
    jLayeredPane1.add(jButton1, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton4.setFont(new java.awt.Font("Tahoma", 0, 1)); // NOI18N
    jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/a.png"))); // NOI18N
    jButton4.setText("A");
    jButton4.setHorizontalTextPosition(javax.swing.Swi ngConstants.CENTER);
    jButton4.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton4ActionPerformed(evt);
    }
    });
    jButton4.setBounds(300, 50, 100, 90);
    jLayeredPane1.add(jButton4, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton6.setFont(new java.awt.Font("Tahoma", 0, 1)); // NOI18N
    jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/w.png"))); // NOI18N
    jButton6.setText("W");
    jButton6.setHorizontalTextPosition(javax.swing.Swi ngConstants.CENTER);
    jButton6.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton6ActionPerformed(evt);
    }
    });
    jButton6.setBounds(0, 140, 100, 90);
    jLayeredPane1.add(jButton6, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton7.setFont(new java.awt.Font("DejaVu Sans", 0, 1)); // NOI18N
    jButton7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/h.png"))); // NOI18N
    jButton7.setText("H");
    jButton7.setHorizontalTextPosition(javax.swing.Swi ngConstants.CENTER);
    jButton7.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton7ActionPerformed(evt);
    }
    });
    jButton7.setBounds(100, 140, 100, 90);
    jLayeredPane1.add(jButton7, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton8.setFont(new java.awt.Font("Tahoma", 0, 1)); // NOI18N
    jButton8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/o.png"))); // NOI18N
    jButton8.setText("O");
    jButton8.setHorizontalTextPosition(javax.swing.Swi ngConstants.CENTER);
    jButton8.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton8ActionPerformed(evt);
    }
    });
    jButton8.setBounds(200, 140, 100, 90);
    jLayeredPane1.add(jButton8, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton9.setFont(new java.awt.Font("Tahoma", 0, 1)); // NOI18N
    jButton9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/l.png"))); // NOI18N
    jButton9.setText("L");
    jButton9.setHorizontalTextPosition(javax.swing.Swi ngConstants.CENTER);
    jButton9.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton9ActionPerformed(evt);
    }
    });
    jButton9.setBounds(300, 140, 100, 90);
    jLayeredPane1.add(jButton9, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton10.setFont(new java.awt.Font("Tahoma", 0, 1)); // NOI18N
    jButton10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/d.png"))); // NOI18N
    jButton10.setText("D");
    jButton10.setHorizontalTextPosition(javax.swing.Sw ingConstants.CENTER);
    jButton10.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton10ActionPerformed(evt);
    }
    });
    jButton10.setBounds(400, 140, 100, 90);
    jLayeredPane1.add(jButton10, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton18.setFont(new java.awt.Font("Tahoma", 0, 1)); // NOI18N
    jButton18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/l.png"))); // NOI18N
    jButton18.setText("L");
    jButton18.setHorizontalTextPosition(javax.swing.Sw ingConstants.CENTER);
    jButton18.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton18ActionPerformed(evt);
    }
    });
    jButton18.setBounds(200, 320, 100, 90);
    jLayeredPane1.add(jButton18, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton16.setFont(new java.awt.Font("Tahoma", 0, 1)); // NOI18N
    jButton16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/l.png"))); // NOI18N
    jButton16.setText("L");
    jButton16.setHorizontalTextPosition(javax.swing.Sw ingConstants.CENTER);
    jButton16.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton16ActionPerformed(evt);
    }
    });
    jButton16.setBounds(0, 320, 100, 90);
    jLayeredPane1.add(jButton16, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton20.setFont(new java.awt.Font("Tahoma", 0, 1)); // NOI18N
    jButton20.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/l.png"))); // NOI18N
    jButton20.setText("L");
    jButton20.setHorizontalTextPosition(javax.swing.Sw ingConstants.CENTER);
    jButton20.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton20ActionPerformed(evt);
    }
    });
    jButton20.setBounds(400, 320, 100, 90);
    jLayeredPane1.add(jButton20, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton17.setFont(new java.awt.Font("Tahoma", 0, 1)); // NOI18N
    jButton17.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/s.png"))); // NOI18N
    jButton17.setText("S");
    jButton17.setHorizontalTextPosition(javax.swing.Sw ingConstants.CENTER);
    jButton17.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton17ActionPerformed(evt);
    }
    });
    jButton17.setBounds(100, 320, 100, 90);
    jLayeredPane1.add(jButton17, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton19.setFont(new java.awt.Font("DejaVu Sans", 0, 1));
    jButton19.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/e.png"))); // NOI18N
    jButton19.setText("E");
    jButton19.setHorizontalTextPosition(javax.swing.Sw ingConstants.CENTER);
    jButton19.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton19ActionPerformed(evt);
    }
    });
    jButton19.setBounds(300, 320, 100, 90);
    jLayeredPane1.add(jButton19, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton11.setFont(new java.awt.Font("Tahoma", 0, 1)); // NOI18N
    jButton11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/o.png"))); // NOI18N
    jButton11.setText("O");
    jButton11.setHorizontalTextPosition(javax.swing.Sw ingConstants.CENTER);
    jButton11.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton11ActionPerformed(evt);
    }
    });
    jButton11.setBounds(0, 230, 100, 90);
    jLayeredPane1.add(jButton11, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton12.setFont(new java.awt.Font("Tahoma", 0, 1)); // NOI18N
    jButton12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/i.png"))); // NOI18N
    jButton12.setText("I");
    jButton12.setHorizontalTextPosition(javax.swing.Sw ingConstants.CENTER);
    jButton12.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton12ActionPerformed(evt);
    }
    });
    jButton12.setBounds(100, 230, 100, 90);
    jLayeredPane1.add(jButton12, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton13.setFont(new java.awt.Font("DejaVu Sans", 0, 1));
    jButton13.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/o.png"))); // NOI18N
    jButton13.setText("O");
    jButton13.setHorizontalTextPosition(javax.swing.Sw ingConstants.CENTER);
    jButton13.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton13ActionPerformed(evt);
    }
    });
    jButton13.setBounds(200, 230, 100, 90);
    jLayeredPane1.add(jButton13, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton15.setFont(new java.awt.Font("Tahoma", 0, 1)); // NOI18N
    jButton15.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/l.png"))); // NOI18N
    jButton15.setText("L");
    jButton15.setHorizontalTextPosition(javax.swing.Sw ingConstants.CENTER);
    jButton15.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton15ActionPerformed(evt);
    }
    });
    jButton15.setBounds(400, 230, 100, 90);
    jLayeredPane1.add(jButton15, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton14.setFont(new java.awt.Font("Tahoma", 0, 1)); // NOI18N
    jButton14.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/i.png"))); // NOI18N
    jButton14.setText("I");
    jButton14.setHorizontalTextPosition(javax.swing.Sw ingConstants.CENTER);
    jButton14.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton14ActionPerformed(evt);
    }
    });
    jButton14.setBounds(300, 230, 100, 90);
    jLayeredPane1.add(jButton14, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton21.setFont(new java.awt.Font("Tahoma", 0, 1)); // NOI18N
    jButton21.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/f.png"))); // NOI18N
    jButton21.setText("F");
    jButton21.setHorizontalTextPosition(javax.swing.Sw ingConstants.CENTER);
    jButton21.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton21ActionPerformed(evt);
    }
    });
    jButton21.setBounds(0, 410, 100, 90);
    jLayeredPane1.add(jButton21, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton22.setFont(new java.awt.Font("Tahoma", 0, 1)); // NOI18N
    jButton22.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/o.png"))); // NOI18N
    jButton22.setText("O");
    jButton22.setHorizontalTextPosition(javax.swing.Sw ingConstants.CENTER);
    jButton22.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton22ActionPerformed(evt);
    }
    });
    jButton22.setBounds(100, 410, 100, 90);
    jLayeredPane1.add(jButton22, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton23.setFont(new java.awt.Font("Tahoma", 0, 1)); // NOI18N
    jButton23.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/r.png"))); // NOI18N
    jButton23.setText("R");
    jButton23.setHorizontalTextPosition(javax.swing.Sw ingConstants.CENTER);
    jButton23.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton23ActionPerformed(evt);
    }
    });
    jButton23.setBounds(200, 410, 100, 90);
    jLayeredPane1.add(jButton23, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton24.setFont(new java.awt.Font("Tahoma", 0, 1)); // NOI18N
    jButton24.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/d.png"))); // NOI18N
    jButton24.setText("D");
    jButton24.setHorizontalTextPosition(javax.swing.Sw ingConstants.CENTER);
    jButton24.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton24ActionPerformed(evt);
    }
    });
    jButton24.setBounds(300, 410, 100, 90);
    jLayeredPane1.add(jButton24, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jButton25.setFont(new java.awt.Font("Tahoma", 0, 1)); // NOI18N
    jButton25.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/a.png"))); // NOI18N
    jButton25.setText("A");
    jButton25.setHorizontalTextPosition(javax.swing.Sw ingConstants.CENTER);
    jButton25.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton25ActionPerformed(evt);
    }
    });
    jButton25.setBounds(400, 410, 100, 90);
    jLayeredPane1.add(jButton25, javax.swing.JLayeredPane.DEFAULT_LAYER);

    clear.setText("CLEAR");
    clear.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    clearActionPerformed(evt);
    }
    });
    clear.setBounds(540, 320, 130, 60);
    jLayeredPane1.add(clear, javax.swing.JLayeredPane.DEFAULT_LAYER);

    display.setEditable(false);
    display.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    displayActionPerformed(evt);
    }
    });
    display.setBounds(540, 380, 130, 80);
    jLayeredPane1.add(display, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/wordTitle.png"))); // NOI18N
    jLabel2.setBounds(500, 40, 170, 140);
    jLayeredPane1.add(jLabel2, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/level/questionMark-background.jpg"))); // NOI18N
    jLabel1.setBounds(0, 0, 730, 500);
    jLayeredPane1.add(jLabel1, javax.swing.JLayeredPane.DEFAULT_LAYER);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout .Alignment.LEADING)
    .addComponent(jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 730, javax.swing.GroupLayout.PREFERRED_SIZE)
    );
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout .Alignment.LEADING)
    .addComponent(jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 500, javax.swing.GroupLayout.PREFERRED_SIZE)
    );

    pack();
    }// </editor-fold>

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    display.setText(display.getText()+jButton1.getText ());


    }

    private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {
    display.setText(display.getText()+jButton7.getText ());


    }

    private void displayActionPerformed(java.awt.event.ActionEvent evt) {
    // TODO add your handling code here:
    }

    private void clearActionPerformed(java.awt.event.ActionEvent evt) {
    display.setText("");
    }

    private void jButton13ActionPerformed(java.awt.event.ActionEven t evt) {
    display.setText(display.getText()+jButton13.getTex t());
    }

    private void jButton19ActionPerformed(java.awt.event.ActionEven t evt) {
    display.setText(display.getText()+jButton19.getTex t());
    }

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
    display.setText(display.getText()+jButton2.getText ());
    }

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
    display.setText(display.getText()+jButton3.getText ());
    }

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
    display.setText(display.getText()+jButton4.getText ());
    }

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {
    display.setText(display.getText()+jButton5.getText ());
    }

    private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {
    display.setText(display.getText()+jButton6.getText ());
    }

    private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {
    display.setText(display.getText()+jButton8.getText ());
    }

    private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {
    display.setText(display.getText()+jButton9.getText ());
    }

    private void jButton10ActionPerformed(java.awt.event.ActionEven t evt) {
    display.setText(display.getText()+jButton10.getTex t());
    }

    private void jButton11ActionPerformed(java.awt.event.ActionEven t evt) {
    display.setText(display.getText()+jButton11.getTex t());
    }

    private void jButton12ActionPerformed(java.awt.event.ActionEven t evt) {
    display.setText(display.getText()+jButton12.getTex t());
    }

    private void jButton14ActionPerformed(java.awt.event.ActionEven t evt) {
    display.setText(display.getText()+jButton14.getTex t());
    }

    private void jButton15ActionPerformed(java.awt.event.ActionEven t evt) {
    display.setText(display.getText()+jButton15.getTex t());
    }

    private void jButton16ActionPerformed(java.awt.event.ActionEven t evt) {
    display.setText(display.getText()+jButton16.getTex t());
    }

    private void jButton17ActionPerformed(java.awt.event.ActionEven t evt) {
    display.setText(display.getText()+jButton17.getTex t());
    }

    private void jButton18ActionPerformed(java.awt.event.ActionEven t evt) {
    display.setText(display.getText()+jButton18.getTex t());
    }

    private void jButton20ActionPerformed(java.awt.event.ActionEven t evt) {
    display.setText(display.getText()+jButton20.getTex t());
    }

    private void jButton21ActionPerformed(java.awt.event.ActionEven t evt) {
    display.setText(display.getText()+jButton21.getTex t());
    }

    private void jButton22ActionPerformed(java.awt.event.ActionEven t evt) {
    display.setText(display.getText()+jButton22.getTex t());
    }

    private void jButton23ActionPerformed(java.awt.event.ActionEven t evt) {
    display.setText(display.getText()+jButton23.getTex t());
    }

    private void jButton24ActionPerformed(java.awt.event.ActionEven t evt) {
    display.setText(display.getText()+jButton24.getTex t());
    }

    private void jButton25ActionPerformed(java.awt.event.ActionEven t evt) {
    display.setText(display.getText()+jButton25.getTex t());
    }

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new Level().setVisible(true);
    }
    });
    }

    // Variables declaration - do not modify
    private javax.swing.JButton clear;
    private java.awt.TextField display;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton10;
    private javax.swing.JButton jButton11;
    private javax.swing.JButton jButton12;
    private javax.swing.JButton jButton13;
    private javax.swing.JButton jButton14;
    private javax.swing.JButton jButton15;
    private javax.swing.JButton jButton16;
    private javax.swing.JButton jButton17;
    private javax.swing.JButton jButton18;
    private javax.swing.JButton jButton19;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton20;
    private javax.swing.JButton jButton21;
    private javax.swing.JButton jButton22;
    private javax.swing.JButton jButton23;
    private javax.swing.JButton jButton24;
    private javax.swing.JButton jButton25;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton6;
    private javax.swing.JButton jButton7;
    private javax.swing.JButton jButton8;
    private javax.swing.JButton jButton9;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLayeredPane jLayeredPane1;
    // End of variables declaration

    public void actionPerformed(ActionEvent e) {
    throw new UnsupportedOperationException("Not supported yet.");

Similar Threads

  1. JavaScript pic puzzle
    By fr334a11 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: March 25th, 2011, 08:29 AM
  2. Help to write Kakuro puzzle solver
    By divadola in forum Algorithms & Recursion
    Replies: 2
    Last Post: March 19th, 2011, 11:10 AM
  3. im in a hurry!!Help with a programm..java game of guessing a word
    By mr_doctor in forum What's Wrong With My Code?
    Replies: 3
    Last Post: October 13th, 2010, 08:17 AM
  4. Replies: 0
    Last Post: March 28th, 2010, 01:27 PM
  5. [SOLVED] Problem in implementation of Fifteen Puzzle with 2D Arrays
    By bruint in forum Collections and Generics
    Replies: 8
    Last Post: May 3rd, 2009, 10:37 PM