masijade 1,351 Industrious Poster Team Colleague Featured Poster

Okay? So the "theory" is there (maybe). But I still need to see at least the attempt at a GUI (which JOptionPane in that manner, IMHO, is not). There is a huge difference. You will need to manage a couple of layouts and use an actionlistener and add components to the containers none of which are necessary for JOptionPane and I am not going to do that for you, as I alredy said). I can guarantee you've already covered this stuff in your class.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

I'm so sorry, but can you please teach me how to do this?

Not until you at least try. We are not here to do your homework for you. You do not learn anything that way, and just makes the rest of the course that much harder (as you are probably already learning as all your other assignments have probably been done by others).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Well, post that. You do realise that that "code" was not cut-n-paste, right? You have to modify to your code, but the syntax is the same.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

I already showed it to you.

component.setOpaque(true)
component.setBackground(someColor)

Give it a try.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Use setOpaque(true) and then setBackground(Color). Try it and post that if it "doesn't work".

masijade 1,351 Industrious Poster Team Colleague Featured Poster

See the API docs for (and/or search for a tutorial on) TimerTask and Timer.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

I'm trying to make it color red. I've been trying to change the color for 2 days

Where? Nothing in that code attempts to change the color of anything.

masijade 1,351 Industrious Poster Team Colleague Featured Poster
FOR CONVERTING COLOR IMAGE TO GREYSCALE IMAGE and creating the histogram of that greyscaled image .Including header files also...
masijade 1,351 Industrious Poster Team Colleague Featured Poster

Hi there,
Pleasure seeing your reply to my post. Also if you could help me with code I will be so thankful to you


dreams.

If by that you mean "can I write it for you", no I can't. Post your attempt here and I will help you correct. I will suggest a borderlayout with the textarea in the center, the top part as a panel with flow layout north and ananlog for the bottom and south.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

The method is the one given, the only other method is to use a while loop and continue generating numbers, comparing them to the ones already generated, until you generate one that hasn't been generated yet. Not very effecient, that. If you are simply looking for cut-n-paste code (for an obvious homework assignment) then you are on your own.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

If you mean no replicates through the life of the program, then follow the advice in the first reply here.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Use a while loop and continue pulling a random second name until it does not match the first?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Since you are only generating up to 10 numbers, I would create an arraylist with all the possible values then generate an index into that arraylist and retreive and remove that index, then you are definately not repeating anything and you don't even need to check.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

And your question? One note though, I would use "names.length" rather than "18" in your random number generation. I would also make "r" an instance variable rather than creating a new one with every call to "getPartner".

masijade 1,351 Industrious Poster Team Colleague Featured Poster

That is then not a real project (there is no bank behind it), it is a "contest". Still, if you need to ask the question you're asking you don't have a chance. Besides, it "sounds" as though you want someone to write it for you since I haven't noticed any kind of effort at all, yet, in which case what are you getting from this "challenge"? Nothing.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

You know, I am not trying to hide things from or mislead you, you know. If you have to do exactly what that description says, then varargs is the only way. As already mentioned, using an array means the constructor takes one parameter, not two. Using overloaded constructors is not really feasible due to the description that more than two parameters must produce a "useful" error message, meaning you would have to create hundreds of the constructors to handle all possible invalid constructor calls (i.e. one with 3, one with four, one with five, etc and a constructor can have hundreds of parameters and you'd have to write a constructor for everyone. You could also write you own object for "passing" the parameters but everything said about the array applies to this, too.

So, as already said, the only "feasable" way to completely satisfy the description is varargs.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

The only way a method or costructor can take a "varying number of parameters" is through varargs. The only other thing is to simply use an array (as the parameter) and check its length. But then, the constructor is still taking just one parameter (not two as stated in the description) its just an array that its receiving, but that doesn't jive with the description either. The only thing that matches the description, as written, is varargs, so, take your choice, use an array (and one parameter), or mulitple overloaded constructors, or do it right and use varargs.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Who says (its called initiative)? Did you ask?

In any case, he is probably hinting at method overloading in that case

public void doit(int argOne) {
    doit(argOne, argOne);
}
public void doit(int argOne, int argTwo) {
    // do whatever
}
masijade 1,351 Industrious Poster Team Colleague Featured Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster

Hopefully not a real project. If so send me the site name that I know never to use it.

If this is a school assignment, then, before becoming this "project" you would have been taught the things you need to know, and would be expected to research and be creative to come up with the rest. So, lets see what you have.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Well, lets see your code, but, to tell you the truth it is nothing but a small, simple GUI, a FileReader and String's split method.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Seeing as how it deosn't do anything, sure, it's fine. This assignment is also not an extreme.beginner assignment (as the code provided implies you are), so either you should simply pack up the course as you lied about your qualifications, or you've been getting all of your sleep in class.

Really, there is nothing there to even start with, and we are not here to do your code for you.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Because the thread was probably already started and is simply finished now. Once that happens you cannot restart it, you must create a new one.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Try reading through this.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

If an instance of "ViewContact" is meant to interact (directly) with an instance of the "MainScreen" class, then it should have a reference to an instance of the "MainScreen" class (i.e. as in passed in in the constructor). As it is all of this code is skewed just enough that I haven't got a clue where to start.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

This code is just all wrong. contactkeeper is a apckage so contactkeeper.mainscr would have to reference a class "mainscr" in the package "contactkeeper" statically, not a local (in main defined) instance of the class MainScreen. You also do not define the "MainList" thing anywhere, and definately not as a static variable, as you are referencing it. I see where you try to use it both classes, but not where you have defined it.

You need to get away from this "VB"/".Net" way of referencing things. It is different in Java.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Sure we can. Post your code and a specific question and we'll be happy to help you correct/improve/complete your code.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

See this thread. After creating the image use the getRGB method.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

You should probably look at that link, too, BTW.

masijade 1,351 Industrious Poster Team Colleague Featured Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster

Well this

"#.#########"

is a String right?

So what's wrong with doing

StringBuilder sb = new StringBuilder("#.");
for (int i = 0; i < userInputedNumber; i++) {
  sb.append("#");
}
DecimalFormat currQuant = new DecimalFormat(sb.toString());
masijade 1,351 Industrious Poster Team Colleague Featured Poster

I would ask, first, what the JavaDB manuals say about that.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

FYI also posted here

masijade 1,351 Industrious Poster Team Colleague Featured Poster

See the second part here.

P.S. Did you even try looking at the API docs, or finding tutorials for the classes listed in my post? No, you didn't, did you?

Edit: Also, you find the above tutorial with a simple Google search for Java grayscale as a link within the first result.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Simply create a BufferedImage of the right size of type "BYTE_GRAY" and draw the colored image into it by retreiving the Graphics from the new BufferedImage and using drawImage with the coloredImage as the argument.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Uhm, read some input and compare it to the randomly selected word?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

I write code to download zip files with exatcting all files in it. but it download only one file with extracing so please tell me changes in following code to download all files from zip files with extracting.

Uhm, put it in a loop?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Okay? So what's your question?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Sorry, this is not a math site, though.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

It is more "effecient" when you use it repeatedly (without recreating it). Otherwise there is overhead, although normally negligable. Once they are running there is no difference.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

No, since you can't "just delete the first whatever". Maybe with some other language would allow you to manipulate the file system in such a way as to move the pointer designating the file to another position on the file system, but Java (and most other languages) do not, generally, give such control.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

When you have a query with no parameters that is not meant to be run multiple times in a row.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Rewrite the remaining 4000 in a new file, delete the old file, and rename the new file to the old file's name.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Talking about elements in a Tree, you, then, don't want either of those. Those are simple sets and maps and the "tree" portion of those only refer to the sorting order. If you need a pre-finished class that can handle trees then see the API docs for DefaultTreeModel (normally used for JTree and GUIs).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

because calendar.getTime() retreives a Date object equivalent to the the last date and time set in that Calendar object (which is, seemingly, the current time at the time you created it). Simply use new Date() where you are currently using that, or, if you insist on using the calendar (maybe because of timezone settings, or whatever) then call setTime first.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

No. That would be a ClassNotFoundException. You are getting a NoSuitableDriver, which means it does not recognise that URL as a MySQL URL and so does not know to use the loaded MySQL driver, so it can only complain that it doesn't have any driver that will work with that URL.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Reread the MySQL Connector/J documentation and redo the URL accordingly.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Okay? That's your assignment, that's your code, what's your problem?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

The "compiler" doesn't matter, the IDE, or more correctly the development environment does and IDE stands for Integrated Development Environment. All the compilers handle the classpath in the same manner as this is part of the standard. It can't even call itself a compiler if it doesn't (IOW). It's the IDEs that have varying ways of designated the libraries to include on the classpath and 99% of the time it has to do with project properties/settings, as already mentioned.

Let the OP read the IDE doumentation with that in mind and do it, there is nothing else that needs to be added in that respect, and the compiler definately has nothing to do with it (especially since this is a runtime error and not a compile time error).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Learn to use Google.