Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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();
}
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

getTime() is just returning the time. It does not need a parameter declared. Check your declaration in the Runner class.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

What have you tried? Have you read the API doc for JTextArea?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Start with the Sun/Oracle tutorial for it.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Well, that is still progress to have it on the Advanced Editor, thanks!
:)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You have create an instance of Font first and use that in your setFont() call.

Take a look at the tutorial on using JTextArea.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Add a mouse listener to whatever component you are using to display the image. You could use a JLabel or JPanel for that.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

The Swing Tutorial is quite extensive.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Take a look at the tutorial How To Use Icons.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Yeah, I would imagine JavaDB would run in a read-only capacity as well. I only have experience with H2.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You can run H2 from a CD, but the data will be read-only. You can't update it from your application.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

That depends on which version of VB you are using: VB 6 or VB.NET

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Agreed. Moving this post...

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Don't use == to compare strings. Use .equals() or .equalsIgnoreCase().

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

It didn't indent because you did not post it within [code] [/code] tags.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Baby --> On board

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Please specify which language you are working with so this thread can be moved to the correct forum.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Yes, I assume the array is to be used for some demo output within main(), though the intended usage is not stated.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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(...),
...
};
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Your users may need to run your program as administrator.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

The OP didn't ask for help - they asked for a project to be mailed to them. His response was entirely appropriate.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

punch in the face --> KoolAid

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Ok, I think this is covered well enough. More SEO-spam-not-quite-answers is not going to help.

Thread closed.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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 '>'.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

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.