masijade 1,351 Industrious Poster Team Colleague Featured Poster

Because all you've done is declare the method, you also need to define it. That method needs to actually do something.

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

MySQL is a server/client db. There must be some sort of server. If you are looking for a DB that doesn't need a server try SQLLite, JavaDB, HSQL, or Apache Derby (or even Access, but I, personally, would not even consider that one).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

You still need to create the public Color newColor(Pixel pixel) method that you are attempting to use.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

src.zip in the jdk directory.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

listFiles() and use the length of the returned array?

See the API docs for File.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

We use the Jakarta POI API for that here at work.

Also Good, though I wonder if either of them have been adapted for Office 2007 yet.

The only thing I didn't like about POI, is that the library is so big. JExcel is much smaller, and yet I haven't found anything (yet) that it can't do that POI can. Then again, the reverse is also true, I haven't found anything POI can't do that JExcel can.

I have to admit though, that I definately have not had extensive experience with both of them. There are, I am sure, things one could do that I haven't attempted, yet.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Aye aye Captain!

Sponge Bob Square Pants?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Why should I? I don't need one.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Then check the API. You're talking only about the BorderLayout, you can use "x-y coordinates" (although not as you probably think) with GridLayout and (even better but much more difficult to get correct) with GridBagLayout. If you want to use "real" coordinates (i.e. pixel locations) then set the layout to null. I strongly advise against this though.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Any layout you want. There are lots of them, see the API and read every class that ends with "Layout".

Now, if you can tell us how it should look, and/or exactly what you mean by "reposition my buttons", we might be able to better help you. Generally though, you need to remove them, then add them in their new position (regardless of the layout used).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Google "Andy Khan JExcel"

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Simple FileInputStream and FileOutputStream.

If you want to read in "binary" then there is no need to wrap those streams in anything else.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

If your "falling behind", as you say, if we did this for you, you would only fall faster, since you wouldn't learn anything, so tomorrow, when you get a new assignment that is, essentially, an expansion on this one, you will have no idea how to do the expansion, since you didn't either do, or learn, this one.

So, tell me again, how this would help you.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

lol no no, that wasn't me that posted in that forum, i did a good a google search for
Applet RTApplet started

and pretty much every single one was flooded with this sharekahn thing

Oh, sorry, I, somehow or another, thought it was the OP that made the post I quoted. Sorry. ;)

masijade 1,351 Industrious Poster Team Colleague Featured Poster

friend lol, we do seem a bit hostile
i can bet this is the sharekahn app i have saw tons of problems about

just because i am nice, check out this link, the bottom post
http://forums.sun.com/thread.jspa?threadID=776507

If you made that "last post", and you're truely talking about a "Microsoft VM", you deserve all the problems you're getting. That thing is a decade old and was never compliant to begin with.

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

Yes you are, and that "doing something wrong" is using scriptlets, period. Move all of that scriptlet stuff out into a bean or two and use the "useBean" tag.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

This class is moving too fast and I only know simple Java programming so far, but we're getting into multiple classes for this savings account program. If anyone can do this I will spam +rep on your for the remainder of your DaniWeb life.

Well, I can do it, so start spamming, I just won't.

I guess your moniker is kinda like calling a 7 foot tall man "tiny", huh? (Only more so.)

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Just simply remove those symbols?

Really, those tags are only compiler "hints". They are there only for your convenience, as it is an indicator to the compiler that the following method is suppossed to override a method of an inheritied class. So, the compiler will check that it actually does so, and if it does not find a method, with that signature, in an inheritied class it will alert you that the method is not overriding anything, thereby preventing some possible polymorphism problems (i.e. you wouldn't using polymorphism when you thought you should be).

Alex Edwards commented: Expert answer =) +4
masijade 1,351 Industrious Poster Team Colleague Featured Poster

Add the java bin directory to your system path (not classpath) environment variable, or use the full path to java when executing it.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Uhm, Peter, what's this

authorsLastName = GetAuthorLastName();

;-)

However, with the way it's written (if it compiles at all) authorsLastName is an instance variable anyway (as it is not declared in the method simply defined), and that is probably not a good idea.

Otherwise, knowing exactly what SQLException you get would help. Post the rest of the message. I can almost guarantee, however, that it has to do with what GetAuthorLastName() is returning (or not).

peter_budo commented: Yes, you right, I did not spot that one +12
masijade 1,351 Industrious Poster Team Colleague Featured Poster

And please don't cross/multi-post the same question. I have requested that the admins remove your other thread (http://www.daniweb.com/forums/thread155457.html).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Depends on the DB and Driver being used, which will also determine whether it can be done at all.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

cant u read?ACCOUNTING MAJOR...

And? You took the course so pass or fail, but on your effort. If you are not willing to put forth any effort, why should anyone else?

i dont have any background in this.this is the first and definatly the last cis course ill be taking ever.

Good for you. Now finish this one or withdraw.

i never realised this would be this tough and also i was tld they would be starting frm the very basic,which didnt happen.

Oh yeah! I can add so how hard can programming be, right?

plus i really dont think i nything is wrong with my attitude.i only just registered and this was my first post.

Other than resuesting someone to do your work for you, no there wasn't. Although, that is a pretty big no no whatever the course is.

Also..plz dont waste ur time,i asked fr help..not a favor.

Okay, we won't waste our time. But requsting someone do it for you is asking for a favor, not help. Asking for help is "Can you give some pointers on how to do this? Or point me somewhere where I can find that information for myself?" And posting the small, relevant parts of the code that are actually problematic. Do you see the difference between that and what you did?

Probably not.

VernonDozier commented: Well stated. +8
masijade 1,351 Industrious Poster Team Colleague Featured Poster

A JSP is nothing but a servlet template that the web container parses and then compiles. That is even less applicable for an "exe" than servlets are.

Gods, I'm sorry, but what is this fascination everyone seems to have for turning cross-platform Java applications into a native application? If you want a native application code in something that is designed to produce a native application.

stephen84s commented: egjaktly +3
masijade 1,351 Industrious Poster Team Colleague Featured Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster

This is an SQL question, but what the heck

SELECT Description, SUM(Quantity) FROM
  ((Select Description, Quantity, PluCode FROM Sale_Mast_Data)
   Union
   (Select Description, Quantity, PluCode FROM Sale_Mast_Data_H))
Group By PluCode

Union usually "ignores" duplicate rows. So, if a row in "_H" is an exact duplicate of a row in the other you will only get one copy of it. If you "need" both, use "UNION ALL".

masijade 1,351 Industrious Poster Team Colleague Featured Poster

can anyone find my mistake in TrainingZone.java

Yes.

stultuske commented: to the point, brief and a technical correct answer :) +3
masijade 1,351 Industrious Poster Team Colleague Featured Poster

> can somebody give me some good example of how to iterate over list,

...

Using a simple looping construct for a LinkedList has serious performance implications ...

Except for the "new" for loop

for (<Type> var : listVar)

which implements an Iterator on it's own. ;)

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Well, like I said, that means you didn't include it on your classpath.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Define "didn't work".

Judging from the rest of your post though, I think I can safely assume that you didn't add it to your classpath properly.

And, AFAIK, jpcap is the only library for this sort of thing (as Java is not really meant for this time of low-level system interface, anyway).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

It's one of the new things with Vista, yes.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Execute that command in a command shell once. You get the prompt back immediately, don't you? Well, the same thing happens by runtime.exec. The command you are calling starts another process that actually shows the browser, and then exits. In any case, as of 1.6 you shouldn't really be calling those things yourself. Use the Desktop class and it's open method, and let the system decide what should be used to show the document. Not only is this usually much more stable, but it is also platform independent, which runtime.exec is not.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Uhm, try maybe Desktop.open()?

And the code always immediately reaches p.watFor(). It's just that it will stay there until the process is ended.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Try printing out investments.size() before the for loop. I have the feeling that it's returning 0 (i.e. it's empty).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

> > And you're real problem, at least IMHO, is using the JDBC-ODBC in Tomcat.

I don't think he is using a bridge type driver given the package name com.microsoft.jdbc.* and [Microsoft][SQLServer 2000 Driver for JDBC] .

Oops, you're right. Whenever I see that "[Microsoft]" I blank out and think JDBC-ODBC (I have never used SQL Server, so I usually only see it when someone is posting an error message that has to do with the bridge and access). ;-)

> The bridge is not threaded and Servlets/JSPs are.

I really don't see how this is different from the way threading is handled in Java I/O classes which do make native calls; the threading is most probably handled in the Java implementation of JdbcOdbc. Some real problems with ODBC implementations are invoking third party native code, installation required on the client machine, debugging nightmares etc. :-)

Maybe, maybe not. The way the thing is used makes a difference (at the very least in performance as the things usually spend more time using a connection and the like than other things). And, normally, DB's being such a large part of an application, it is just that much more likely to be a problem (or at the very least a drag). You can't even have multiple open statements on a single connection.

http://java.sun.com/products/jdbc/faq.html#15

In any case, the JDBC-ODBC bridge should always be, IMHO, the "driver of last resort". There must be a reason that the Driver is …

masijade 1,351 Industrious Poster Team Colleague Featured Poster

If they are writing everything (or even alot) in main, then they are not using Java properly. They are attempting to perform procedural programming using an Object-Oriented language. Ignore them.

Alex Edwards commented: Funny, direct and correct! =) +4
masijade 1,351 Industrious Poster Team Colleague Featured Poster

They compare the file objects and not the actual files that these file objects refer to.

You need to actually read the files and compare then byte for byte until a difference is found (although, I would say to check the sizes first, as that is fast and if they are not the same size, there is no reason to compare them).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

before setAutoCommit(true) you need to do a commit(), but your problem comes before this. And you're real problem, at least IMHO, is using the JDBC-ODBC in Tomcat. The bridge is not threaded and Servlets/JSPs are. They do not work well together. So, that is quite possibly also your real problem and not only my opinion. More than that I cannot (without much more information) and, truthfully, will not say.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Google "JavaMail"

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Okay?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

if he tried that, he'd start at the top... and misserabely fails to translate #include to import ...

Well, there you have it. ;-)

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Boss why are u soo rude??

I'm not rude, I just don't sugar coat things. If you are doing "whatever", I am going to say "you are doing whatever", I'm not going to "politely" hint at. People may not (and usually don't) like that, but they do respond to it (even if only to "salvage their pride").

i m not asking any body to solve this for me... OK

Yes you were, and are. Stop dissembling.

dont be rude Understand !!!!

See above.

U r on tech forum not in a corner shop....

You're lucky we're not, you'd only have been embarressed more because everybody would have heard me chuckling. Then you would probably get really made and attempt to do something about it, and I'd have had to teach you a different lesson.

Alex Edwards commented: =P +4
masijade 1,351 Industrious Poster Team Colleague Featured Poster

Why did you double post at the same time?
What do you think you can accomplish by that?

Triple. See the following:

http://www.daniweb.com/forums/thread151490.html

masijade 1,351 Industrious Poster Team Colleague Featured Poster

He is, seemingly, attempting to convert a C program code to Java (and not doing a very good job of it since he is simply attempting to translate line for line).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

It's because of the open brace '{' you have right before it.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

So loop through the list and perform a file.canRead() on it before displaying it.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Read that tutorial that was linked to in jasimp's post and stop whining. No one here is going to do it for you.

After you try it, and it still doesn't work (which it won't) then post your code, all compiler/error messages and description of what is happening and how it relates to what should be happening.

If you can/will not do the above, then just go away.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

The SAX or DOM XML Parser, that comes with the JDK, and a Canvas.

Good Luck, because until you actually do something yourself, that's all you're getting.