In which package is Grid(in-built) class is there? I guess util. But Grid creation using create() shows error.

Recommended Answers

All 7 Replies

We have to use 2d array to create a grid. If anybody knows anyother simple way to design a thread tell me.

In which package is Grid(in-built) class is there? I guess util. But Grid creation using create() shows error.

We have to use 2d array to create a grid. If anybody knows anyother simple way to design a thread tell me.

There is no "Grid" class in the java api as far as i know, you may be looking at some kind of layout object.

By the sounds of it, you are required to make you own "Grid" class.

A 2D array, is pretty much everything you want, so it will be the main part of your grid class.

As for this: "If anybody knows anyother simple way to design a thread tell me." Are you asking about threads now? If you dont know how to do 2D arrays, leave threads for annother day.

What is your actual question?

As for this: "If anybody knows anyother simple way to design a thread tell me." Are you asking about threads now? If you dont know how to do 2D arrays, leave threads for annother day.

Well, investigate the posting history.

Well, investigate the posting history.

oh dear... If you are having trouble with constructors threads should be a distant dream...

oh dear... If you are having trouble with constructors threads should be a distant dream...

That I dont mean to say thread , I mean Grid there.But by array itself grid can be easily managed. I thought of using vector instead of array. But mistakenly i entered thread. I need theoritical explanation with samples of thread programs. Can u suggest such a tutorial?

That I dont mean to say thread , I mean Grid there.But by array itself grid can be easily managed. I thought of using vector instead of array. But mistakenly i entered thread. I need theoritical explanation with samples of thread programs. Can u suggest such a tutorial?

Your question is rather confusing:

I need theoritical explanation with samples of thread programs.

Do you want to know about threads or arrays? Is this annother mistake?

I mean Grid there.But by array itself grid can be easily managed. I thought of using vector instead of array.

a grid can indeed be managed easily with an array - so why would you want to use a vector? Vectors are a linear collection, a two dimentional array is much more suitable in my opinion. You could make a vector of vectors but it would probably be easier for you to use an array.

http://www.google.co.uk/search?q=2D+array+java+tutorial&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a

No, No. It's for threads only. And I previously thought like this(may possible and efficient with vector)But i completed that grid with array itself.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.