Is there an error or anything? You just say it causes your applet not to run. Is there any way to can elaborate? It will make it easier for us to help you.
Type: Posts; User: mesatrin1
Is there an error or anything? You just say it causes your applet not to run. Is there any way to can elaborate? It will make it easier for us to help you.
Here is a way to do images. I will need to rewrite some of my code for a text file and I don't have the time to do it atm. How I have it set up you upload the file from a location on your webhost. ...
Try adding some print statements in your for loop. You will not be getting into your loop at all.
private int rows, columns = 10; <--This does not work like you think it does.
private int...
Here I did some of it for you. You need to finish out the logic of how to set colors but you should get the idea. Really you do not even need the Tile class but I left it in because I am assuming...
I tested your code and changed setbounds to setPreferredsize and it worked. I changed your color to black to make it easier to see over the white on white.
package testing;
import...
Try this. I did not actually test this but I think this is your problem. Add the panel to the viewport of the scroll pane.
JPanel panel;
JScrollPane scrollPane;
//this...
After about 2 hours of work this is what I came up with. It still needs quite a bit of work, but it is a start. The dropping on the target is dicey at best, and once the label is added to the...
I forget where I got this code from. I have modified this code from an example I got. The yellow JLabel is dropable into either of the JPanels. The panels will change to red when they are dragged...
One thing I would like to suggest is to think about your classes. You have a GameBoard and you have a Tile class. When you think about what a game board is, it is a collection of tiles. You have...