Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I didn't run into problems with long string (at least up to 3662 characters - I didn't try more) as long as the longest unbroken string of characters (single word) was less than <your guess here> . Here's a hint.

while (charText[rightEdge] != SPACE_CHAR) {
                    --rightEdge;
                }

Trace through what happens after you have moved 'rightEdge' with this line rightEdge = leftEdge + SPACES; and you encounter a long unbroken string of characters.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

And is your report getting done?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Well, based on all the code you posted and the detailed explanation of the error ...

Killer_Typo commented: hahahahaha I needed that laugh! +7
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Well, they're limited to 2,147,483,647 elements (which would be 4gb of data). I doubt you are hitting that limit.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

So write it. It's your homework and this has nothing to do with Java.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I guess you need to buy them then. Some authors do actually expect to be paid for their work.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Are they available from the publisher or author as free downloads?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I think it's probably just a validation issue with the container since you're changing the reference to the table. I would try to validate the JFrame and call repaint after you're swapped out that table as a start.

Something to consider though: you only need to change the model when you load a new map. You can build a new model for that map file and call table.setModel() with the new model, without having to create a new table every time.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You need to run that jar from the command prompt with java -jar MyApp.jar . Double-clicking the jar file runs it with "javaw", which has no visible command window.
You can make a batch program or a shortcut to run the java command if you need something to click to run.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Are you're referring to the fact that when you double-click a jar file, there is no command window shown?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Yes, you can. You do have to import the class, but you don't have to instantiate it. Static methods are invoked directly from the class name.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Well, perhaps you should look up the JTextField API and see what it says about the getWord() method...

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

"Disconnected" - In Flames
http://www.youtube.com/watch?v=xmGAqeJWeug
Great song.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

goyofoyo, it looks as if you modified the code you posted after BestJestSinceJC's question and did not mention the edit, which makes the thread very hard to follow. In the future, post the updated code as a reply and note what you've changed and what problems you are still having with it, if any.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

No, you don't need to instantiate the class to call static methods. Just prefix the method with the class name. So using stultuske's class above you would simply call

String response = Messages.askInput("Enter some data");
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

That is exactly what the static methods on the utility class that stultuske suggested above would do for you.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Are you talking about integers of more than 10 bytes ..like 12345678910228377466464678262737867865786826868326???

@Ezzaral
Are you happy ???

Yes, much better. That wasn't so hard, was it?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Leave your lame chat-speak at the door. Read the forum rules on this.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

And I don't know what you think this line is doing for you

inputdata=new Vector();

but it isn't.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Read the tutorials you have been pointed towards, make an effort to apply them, and then post questions if you run into difficulty. Don't expect people to post detailed examples of every single thing.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I never posted in Community Introduction either.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Actually, a DocumentListener is better suited to that purpose. Read more about the Document model here: http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html#document

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

Because you have declared and added that text area as a local variable in your constructor here

JTextArea txtAreaArticle = new JTextArea(15,40);

That is declaring a new JTextArea of the same name local to the constructor block. You need to drop the "JTextArea" type from that statement if you want to initialize the one you have already declared at the class level.

txtAreaArticle = new JTextArea(15,40);
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

By 21 posts, you should know how to use [code] [/code] tags.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

And did you try it with larger values? Run this with various values for the sleep time

long start = 0;
for (int i=0; i<20; i++){
    start = System.currentTimeMillis();
    try {
        Thread.sleep(500);
    } catch (InterruptedException e) {
    }
    System.out.println((System.currentTimeMillis() - start));
}

And the doc on currentTimeMillis() has the following to say

public static long currentTimeMillis()
Returns the current time in milliseconds. Note that while the unit of time of the return value is a millisecond, the granularity of the value depends on the underlying operating system and may be larger. For example, many operating systems measure time in units of tens of milliseconds.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

That is the currently selected file, so you could do this

JFileChooser chooser = new JFileChooser();
chooser.setSelectedFile(new File("Write your file name here"));

Personally, I don't see why you would want to, but that will do it.

(And there is no one named "u" here. Leave the lazy chat speak at the door)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Tin foil hat recommended.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Diecast playing at the moment following Atreyu on Pandora Radio.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Go for either one, or both. They are both good languages and there are plenty of tutorials available with a simple Google search. The Java forum here has a "Getting Started" thread stickied at the top. I didn't see one in the C# forum, but searching and asking questions should provide more than enough information to immerse yourself in.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Take a look at SwingWorker. You may want to read this tutorial as well: http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

624

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I can follow the language just fine. It is the concept of cheating as some kind of "buffer" that eludes me.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

What? I cannot make any sense out of what you are trying to say there at all.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Why? Are the "cou" currently off schedule?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

That is an applet object tag - not Applet source code. You need the "burnshow.jar" if you're going to do anything with that at all.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

i dont violate any copyrights or so, so from their perspective my potential thoughts do not cause any problem. i dont violate any laws.

I did not mention violation of laws. Show them this thread if you are so proud of it.

By the way, one of the christian missioners in my company gave me two dvds and i am totally persuaded that darwinism is just impossible because even the most primitive cell requires all at ones and simultaneous structures. i will post the name of that dvds later.

This has nothing to do with the discussion at hand and belongs in the lounge.

stephen84s commented: Bang on target !!! +7
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I think the entire thread should be deleted. It's certainly in conflict with the "We only give homework help to those who show effort" mantra that can be found posted through the site.

I also have to wonder how your employer and coworkers would feel about the level of ethical flexibility you've pronounced in this thread.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I don't think you should have to do anything special with it since Java uses unicode by default. Perhaps the file itself is using some other encodiing? Maybe this link could be helpful: http://www.exampledepot.com/egs/java.nio.charset/ConvertChar.html

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

OpenGL and Java3D are only necessary for 3D work. You don't need to worry about them if you are working with 2D.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

This portion of the JavaDB tutorial they link to describes how to start the db server: http://db.apache.org/derby/docs/dev/getstart/twwdactivity2.html

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

So you are just posting answers to homework questions so students can Google them easier?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

>Places of origin doesn't matter.
Well, place of origin does matter when the question of the thread is "Where are you guys from?".

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Maybe this example (and the others listed below it) will get you started: http://www.exampledepot.com/egs/java.awt.image/ImagePixel.html?l=rel

BufferedImage and Raster both have methods that allow you to work directly with the pixel array data.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You'll probably have to attach the debugger from a separate command window.
From the Sun doc on jdb:

For example, the following command will run the MyClass application, and allow jdb to connect to it at a later time.

% java -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n MyClass

You can then attach jdb to the VM with the following commmand:

% jdb -attach 8000

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

614

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Some of their songs (and videos) are a bit odd though, 'A Little Peace of Heaven' comes to mind ...

Agreed. I don't care for that one, nor "Dear God" (I banned that track after about 7 seconds of it).

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Within Temptation, can't stop listening to them lately :icon_cheesygrin: Such an amazing voice she has.
http://www.youtube.com/watch?v=KrwDHVNdgdw

Yes, a very impressive voice.

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

You didn't post any code, so I can't speak directly to your current structure, but you should be able to do all that in your current animation loop. If your paint method were to operate on a List of car objects, your animation loop can simply update/create/remove car objects in that list and call repaint.

while (running) {
  updateCars();
  repaint();
}