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...
Type: Posts; User: jocdrew21
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...
ahhhhhhhhhhhhhh........
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
public class MatrixButtons extends JButton implements...
MatrixButtons()
{
wall = new ImageIcon("wall.png");
begin = new ImageIcon("begin.png");
end = new ImageIcon("end.png");
this.addActionListener(this);
}
I did
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...
//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();...
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...
it is this method:
void findEndButton()
{
for(int i=0;i<20;i++)
{
for(int j =0;j<20;j++)
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...