r1x = 210;
ints can't call methods.
Type: Posts; User: GoodbyeWorld
r1x = 210;
ints can't call methods.
Ok, I cannot find the "Mark Thread as Solved" button. Had to do it manually. (And it only did it for the first post here in this thread.)
By any chance are you trying to do a generic with int like this
If so, then it would be ArrayList<Integer>.
Do a println to see if it's losing your values.
What do you mean "printing out"? JLabels don't have a print function.
This is doing the same thing many times.
for (int i=0; i<...
I believe that scan.nextInt() actually would read in a value, which would be lost the way you had that second while loop, so that's not what you wanted anyway.
I'm not sure quite what you are doing. You are making it be -113 twice.
Here's part of what you could do. It saves some lines. Right now, you are printing each slot for every iteration of...
I noticed that your buttons appear to have the same code in your ActionListeners. Granted, it appears that you are adding them in slightly different places with your layout, but the ActionListeners...
Discussion group to resolve the error? Do you mean you have this posted on other forums/places and not just here? If so, please post a link to there.
Not sure what your Arithmetic class does,...
double i, j, k
double i = 50.0;
double k = i + 50.0;
double j = k + 1;
I'm not sure why you are declaring i, j, and k twice.
Also, you forgot the ; after "double i, j, k".
Not sure. You could subclass JPanel and override paintComponent() and paint it as the background image if that's what you're thinking of.,
What you are doing now just adds a JLabel with an...
I didn't have the icon file so it wasn't showing it. However, it took till the second time of clicking a button before it went to image like you had in your first picture.
For one thing, you never got rid of the button text, so it has both the icon and the text when you call setIcon().
What do you mean it jumbles up all the other buttons?
In setAllButtons(), it appears that you are setting the locations of the buttons themselves. I wouldn't call this every time one of your...
Take away the = in k <= a.length;
Then it will go from indexes 0 to 3. The way you have it right now, it is going from indexes 0 to 4, but there is no 4, hence the exception.
Looks like it can't find a method in there. Perhaps you made a typo in there somewhere and misspelled the method name or something.
for(int k=0; k<=a.length; k++ )
indexes go from 0 to .length -1. Your = will make it go to index 4, which is out of bounds.
Not quite sure why that last one would be needed. While it is true that those methods don't need to be static, I don't see hwy you'd only need to move that stuff out of the main method.
Any reason why you are adding the JButtons and other things to both your JFrame object created in gui() and your JFrame subclass?
Also, you can do an Action Listener like this
LinkedLists are linked and you cannot access them in the middle quickly like you can with arrays. Rather, depending on whether your list is singly linked or doubly linked, you have to hop from the...
Maybe this might be the problem
for (int j=0;j<20;i++)
You already added the ActionListener to the buttons. As for your text field, I would add it with the other stuff and not create and add it in the ActionListener.
As for getting the numbers, I'd...
Here is the code so everyone can see it. You had a lot of compiler errors. As they were simple (forgetting variable names, perhaps meaning to define variables but forgetting, and things like that,...
I'm not as sure how to do with this BufferedWriter as I am PrintWriter, as PrintWriter had a write(String) (BufferedWriter only has write(String, int, int) like PrintWriter has.)
You should be...
Um, just a theory, but perhaps you could have the add statements done in the constructor. The only thing I can think of that would make it not work is that you cannot call a method like that outside...