Search:

Type: Posts; User: jocdrew21

Search: Search took 0.20 seconds.

  1. Replies
    17
    Views
    1,133

    Re: Null pointer error JButton:

    This is causing me several issues norm. I decided I would create the buttons in the screen class, makes sense right. I need each button to have 3 icons set to it.




    Screen()
    {
    //main...
  2. Replies
    17
    Views
    1,133

    Re: Null pointer error JButton:

    ahhhhhhhhhhhhhh........
  3. Replies
    17
    Views
    1,133

    Re: Null pointer error JButton:

    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;

    import javax.swing.ImageIcon;
    import javax.swing.JButton;

    public class MatrixButtons extends JButton implements...
  4. Replies
    17
    Views
    1,133

    Re: Null pointer error JButton:

    MatrixButtons()
    {
    wall = new ImageIcon("wall.png");
    begin = new ImageIcon("begin.png");
    end = new ImageIcon("end.png");
    this.addActionListener(this);
    }


    I did
  5. Replies
    17
    Views
    1,133

    Re: Null pointer error JButton:

    I was having a hard time trying to figure out a way to handle this function so I got out a piece of paper and got this logic below. However I would prefer to pass in a button and get is current...
  6. Replies
    17
    Views
    1,133

    Re: Null pointer error JButton:

    //initialize new buttons
    void initialize()
    {
    for(int i=0;i<20;i++)
    {
    for(int j=0;j<20;j++)
    {
    current[i][j] = new MatrixButtons();
    endButton[i][j]=new MatrixButtons();...
  7. Replies
    17
    Views
    1,133

    Re: Null pointer error JButton:

    I have tried this before and got the same errors. I know what I need to use them for and I am. I am calling the class and creating a new object




    ArrayList<MatrixButtons> openList = new...
  8. Replies
    17
    Views
    1,133

    Re: Null pointer error JButton:

    it is this method:



    void findEndButton()
    {

    for(int i=0;i<20;i++)
    {
    for(int j =0;j<20;j++)
  9. Replies
    17
    Views
    1,133

    Null pointer error JButton:

    I am trying to program the A star algorithm using JButtons. Now I have some tweaking to do but I have to get past the errors first. I will post all three classes just because this is my first post...
Results 1 to 9 of 9