You are getting a null value from getColumnClass, so I would look closer at what this method is returning from your model
public Class getColumnClass(int col) {
return getValueAt(0, col).getClass();
}
You are getting a null value from getColumnClass, so I would look closer at what this method is returning from your model
public Class getColumnClass(int col) {
return getValueAt(0, col).getClass();
}
The above code will not work.
It should also be noted that we don't simply write a solution to someone's homework here and all code should be nested in [code]
[/code] tags.
That depends entirely on what you need done and where you look. Requests such as this can be made in the appropriate Business Exchange > Looking To Hire sub-forum.
If you don't need to maintain the original sorted list, you could just search for and move the fastest runner to a new List three times in succession.
If you do want to maintain the sorted results, you can use Collections.sort(). I posted the brief tutorial link for that a few posts back.
Not entirely sure about the background because you are using some third-party Console class that isn't part of the JDK. Check your API docs on Console.
As far as the balls though, set the color before you draw each one. Set color, draw shape, set color, draw shape... Your code above is setting the color twice before a single draw operation.
Well, it's your program. How much more motivation do you need? Read the available methods for the JTextArea and see if any are available to add text.
Honestly, if you don't learn to effectively get this information from the API docs, your use of Java is going to be quite hobbled and difficult. I know it's a lot to wade into, but taking the time to learn how to use them well will definitely pay off.
getTime() is just returning the time. It does not need a parameter declared. Check your declaration in the Runner class.
What have you tried? Have you read the API doc for JTextArea?
That is the toString() output of your ArrayList. You could override toString() on your Runner class to provide a different string value for the Runner object or you can loop the list and print whatever you want from each Runner object.
Move genRandomTime() outside of main(). You can't declare methods inside methods. You will also need to move the declaration of 'ranGen' out of main() so your function can access it.
You can read a bit about sorting a collection here: http://download.oracle.com/javase/tutorial/collections/algorithms/index.html#sorting
You still have problems with your method blocks and braces. The only problem with your first version was that you tried to declare the methods inside the main() method rather than outside of it. You can't declare methods within methods.
The second version has no code at all in main() and many other empty blocks (between braces). You need to fix all of those brace problems so your class is structured properly. example
public class Blah {
public static double hourlyWage;
public static void main(String Args[])
{
setHourlyWage();
}
public static void setHourlyWage()
{
...
}
}
Look more closely at the structure of the methods and note that the braces denote the beginning and ending of the method bodies.
Well, that is still progress to have it on the Advanced Editor, thanks!
:)
Ok, so how do you figure resurrecting this dead thread is going to help with that? Do you actually have a question? Did you try contacting Oracle any other way?
Remember the origin of your graphics context is the upper left corner and y increases downward. If your input is using the lower left corner as an origin and increases upward, you need to invert your Y coordinate by subtracting it from the height of your area when you draw the point.
You have create an instance of Font first and use that in your setFont() call.
Take a look at the tutorial on using JTextArea.
Just increment a "currentImageIndex" value in your click handler and call a routine to load and paint that image. I assume you got the basic image display working from your other thread.
Note that you could just leave them in your 'names' list without converting that to an array. You also don't need to store the blank lines.
The empty line is fine. It still ends with a line terminator, so it's not null. Your loop will be fine and you can just ignore the empty string values.
Try inverting your Y coordinate by subtracting it from your height.
Your original code showed transformations being applied to position the ovals, so it would seem your IR device is using a different coordinate system than your graphics context.
Use plenty of System.out.println() statements to verify your coordinates and your math.
Add a mouse listener to whatever component you are using to display the image. You could use a JLabel or JPanel for that.
Perhaps if you indicated which language you are working in, this thread could be moved to the proper forum where someone may be able to assist you.
Yeah, I would imagine JavaDB would run in a read-only capacity as well. I only have experience with H2.
I have removed the url that you posted, chinmc, but you should know that your Apache server is allowing directory traversal. I would recommend you turn that off.
They don't do anything because of lines 1 and 2.
You can read what translate() does here: http://download.oracle.com/javase/6/docs/api/java/awt/Graphics2D.html#translate(int,%20int)
Line 13 is a (somewhat inefficient and perhaps ill-fated) way of resetting back to the default starting point of your coordinate system.
That depends on which version of VB you are using: VB 6 or VB.NET
Agreed. Moving this post...
If your school requires that you work with a version prior to 9i, they should be willing to provide it.
Otherwise, why not just work with 10g?
http://www.oracle.com/technetwork/database/express-edition/overview/index.html
Don't use == to compare strings. Use .equals() or .equalsIgnoreCase().
It didn't indent because you did not post it within [code] [/code] tags.
What errors specifically? "Numerous errors" doesn't really mean much to someone who can't see them, and since you didn't post the "die" class no one else can compile and run this.
Baby --> On board
Please specify which language you are working with so this thread can be moved to the correct forum.
Yes, I assume the array is to be used for some demo output within main(), though the intended usage is not stated.
LOL.. shows how much attention I was really paying to the code :)
That's what I get for hammering out a quick answer before I take care of something else at work.
Better check that declaration as Norm said.
Just assign the elements your new instances
movies[0] = new Movie(...);
or you can initialize them all at once
int[] movies = {
new Movie(...),
new Movie(...),
...
};
If you trace the function values through a small test node, you will see how the sum is automatically updated as the nested calls return back up the call stack.
I would throw in a vote for H2 for embedded use. Derby doesn't have a boolean data type, which is just irritating.
Feature comparison: http://www.h2database.com/html/features.html#comparison
It's also slower: http://www.h2database.com/html/performance.html
Your users may need to run your program as administrator.
Hi, welcome to the forums.
I'm sure that someone could probably help you out with the VB code if you post the code and your questions over in our VB.NET forum.
The OP didn't ask for help - they asked for a project to be mailed to them. His response was entirely appropriate.
punch in the face --> KoolAid
Ok, I think this is covered well enough. More SEO-spam-not-quite-answers is not going to help.
Thread closed.
Consider whether you need to go any further in your array loops once you have found and moved your player symbol. It seems to me that you're done at that point.
You only have a partial expression after your OR operator
if (outsideTemperature < -58 || > 41)
You aren't comparing anything to 41 in that statement. If you want to check it against 'outsideTemperature' then you must state that explicitly. The compiler just sees that you have nothing on the left hand side of the '>'.
I'd say you just need to check that your year count is less than the total before you prompt for another year.
Hitting "No" worked just fine for me. The program exited as expected.