Thanks for your answer Greg.
Yeah there are alot of crappy tutorials out there . I've looked through many of them . I already have my basic board layout which I can interact with using a mouse...
Type: Posts; User: Att1li
Thanks for your answer Greg.
Yeah there are alot of crappy tutorials out there . I've looked through many of them . I already have my basic board layout which I can interact with using a mouse...
I just did my graphics in accordance to some chess tutorial on youtube. Granted he doesn't sound like he entirely knows what he is talking about but it works , sortoff and I can't find a better...
You are probably right ,
My point is not to make this engine in an object-oriented fashion . It's just that I read that the graphics have to be in one class and the engine in another so I need to...
I apologize for the confusion.
What I wanted to do is access a few variables and methods from my UserInterface class.
It was giving me an error because I was trying to access them through an...
My mistake .
When I said "it's not working" I meant that it shows me a red error on the code line in the IDE . Says 'symbol not found'
So the
f.add(ui); // Adds instance of the user interface class
f.setSize(800,800); // Size of main window
f.setVisible(true); // Has to be set true to be visible
should be moved to the...
In the constructor of the Userinterface class?
I have it defined like this :
public static void main(String[] args) {
JFrame f = new JFrame("Chess graphix");
...
I see ,
So they way I understand it is that the add listener methods add a listener every time they are called so I should remove them from the paintComponent() method?
Where should I put them...
I'm not sure what you mean by addlistener method . I'm still a beginner in java so I apologise for the ignorance .
Below is the whole class , so perhaps you can point as to where it's being called...
Thanks for the reply .
No it is written once each.
I also have declared the following statements:
@Override
public void mouseClicked(MouseEvent e){
Hello
I am making a Chess engine for a school project and i've been having some issues with the mouselistener .
When I perform a mouse "pressed" event , the code inside the event gets executed 3...