masijade 1,351 Industrious Poster Team Colleague Featured Poster

Um, that would create a Button with the text "images\cut.gif", not an Icon.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

How are you loading the images? Hopefully with getResource (or getResourceAsStream) and not with File (or FileInputStream, etc) as the items in a jarfile are not Files, at least until the jarfile is unpacked.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Google "install4j" (I believe it's called that).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

A program (so long as it is "self-contained") is an application. What is your actual question here? Is it how to create an installer? Is it how to create "cool" start buttons on the desktop? etc, etc

masijade 1,351 Industrious Poster Team Colleague Featured Poster

No help whatsoever.

@p00dle
Why don't you show us your "read" and "print out" code?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

You are probably "sending your data" on the event thread which prevents any other event from triggering (and prevent most other GUI functions as well) until it is finished. Your action listener should start another thread and that thread should "send the data", or, better, you should start a new thread at program startup that is responsible for "sending the data" and create a queue that it reads from, and your action listener should then simply place things on that queue.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Unfortunately for you, SQLite is one of the least compliant DBs.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

That depends. If you use SQL that is specifc to that DB, then no, 100% compatable it is not. And since not all DBs implement the entire range of SQL98 you can't even be sure of being compatable when sticking to that. But, for the most part, sticking to SQL98 will make the program about 99% compatable. It's only when you get into complicated statements and/or optimizing statements that you get into real problems.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

No. It wouldn't. Normally you don't make JFileChooser part of another dialog, as it is a completely self-enclosed Dialog itself, you need simply use it. See http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Um, I'm sorry, but what is wrong with JFileChooser?

In any case, if you insist on recreating the wheel, here.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

:sigh:

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Did you search for exactly "SQLite JDBC Driver". If so, the very first link works, but there are many others, and the third link (the one from sqlite.org) has a list of possible drivers. Take your choice.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Yes. Write a Comparator. (see the API docs for Comparator and the Collections Tutorials)

masijade 1,351 Industrious Poster Team Colleague Featured Poster

It has found the node, but the word itself, i.e. Apple is a child node of the "word" node, a TextNode type.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Well, then, Google for SQLite JDBC Driver. There is one out there. It is not a Type 4.0 Driver (AFAIK), however.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

We will be more than happy to help you. Post your code with a complete listing of all compiler message and/or exception messages and complete, but brief description of what, exactly you are haviong a problem with and we will help you correct it. But, when you dump an assignment text and say "do this by saturday" what are you expecting? I'll tell you what you're expecting. You're expecting someone to do it for you.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

I want solution for code before saturday

Then you'd better get cracking. We are not a homework (cheating) service.

Maybe next time you'll do your homework rather than go partying.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

after j.add add j.validate() and j.repaint(), and then try again.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

You don't have to.

Simply do readLine until it returns null as shown in the second example in the Tutorial.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Rather than Scanner use a BufferedReader, its readLine method, and String's split method.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Then maybe you should download a newer version of iText.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Then check that those packages are actually there. Check that the classes you're attempting to call are actually in those packages, and check that everything is spelled right.

If all those classes are suppossed to be in that jar, and they are in that jar, and you are using the right classes (with full package), and they are not mispelled, then they will be found. The compiler does not pick and choose which packages from a jar to include, and which not. So, if the jar exists, and contains the things you are trying to use, then the problem is yours. Either mispelling, wrong package for the class, or the jar not properly included on the class path (i.e. build path in this case).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

"project properties"
"build path"

masijade 1,351 Industrious Poster Team Colleague Featured Poster

One thing that might cause "strange effects" is the way that public static final (or protected/default static final for sub/package classes) are handled. Those values compiled directly into the class using them, so a change to one of those without recompiling the classes that use them will cause a "disconnect". I.E. the other classes will still be using the original value.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

No. It's a simple discussion of personal opinions/views of the pros and cons of varying approachs.

If your question is solved, go ahead and mark it as solved, that won't stop people from being able to post in it.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Nope all four are there, but the first one is an empty string.

And that exception comes from the second array where, I can only assume, you are trying to set the elements of a String array with LinkedLists.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Well, now, that's what I said, isn't it? Is there something wrong with allowing the OP have a feeling of accomplishment by solving it himself? Do you feel the OP is too dense to figure it out alone given the information provided?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

The first index of an array is 0, which means the last index of an array is one less than its length. So, knowing that, take a look at the condition in your for loop and see if can find and fix the problem.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Do you want to "set the element to 0" or do you want to remove it. The sample code will actually remove it. If all you want to do is set it to 0, then there is no reason to "record" the index when you find it, simply set it to zero then and there (or, more probably null, or setName to null or "", since the array contains objects, seemingly).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Then I'm impressed, they've gotten better.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

And of course you use JSP/Servlet, That, of course, does not invalidate the argument. And you completely missed the point about methods. And building a GUI by hand, when done properly, as I said, does not produce rigid and repetitive code, unless you code in the same way as the GUI Builders. And, as I said, I have never seen a GUI builder that lets you choose what layout you wish to use. That would cause too many variations in the way the GUI builder must react, and, as I said, I have never seen one that uses GridBagLayout, so a complex GUI will winf up using about 5 times as much heap space as necessary. It is not something that is fatal, usually, and not someting that you always, or even usually need to be concerned with, but sometimes you do.

I have no problem with people using them. Exactly the opposite. But, especially for the beginner it is very important to start building them manually. It is important to know how to do it yourself, or you will never be able to diagnose problems that even just might be caused by that. And you will be completely lost if you need to make even just a minor change to it and do not have your builder to use, or, in the framework of the project, are not allowed to use it, which happens more often than you may think.

I also see no argument in support …

masijade 1,351 Industrious Poster Team Colleague Featured Poster

I must disagree here: For example with NetBeans you can subclass a JPanel and make it whatever you want, like an interface for whatever you have (like a database record, a file...). Then you can write "custom creation code", create your component directly or through a factory which also links it to the data it has to generate values from, and still drag it around in your visual builder, and set properties like size, colour... And then you can even make that JPanel to require a ComboBox or whatever else palaced into it, so it'll use that as a prototype to create the custom ones!
Back a while with Delphi I used to think like you, but that GUI builder was crap, and all of them is.

Good for you, to each his own.

It's also a good thing to be able to start Java without knowing how to create JFrames, and learn it on the way. But it's best to learn how to create JFrame, learn how your GUI handles it, and learn how each one is intended be customized, since the point of every OO framework is to be customized.

Maybe, but I still find it best to learn it manually first so you know what it is the code those GUI Builders make does.

When you have to put a lot of simple components onto a form, it's inevitable to produce rigid and repetitive code, just because it's data hardcoded into program code, and GUI editors …

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

Well, unless you have a specific reason to extend JFrame, don't extend that either. Google "composition".

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Implement Runnable unless you have some specific reason for extending Thread.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Manual. Gives full control with no "bolierplate", repetitive, rigid code.

But that's not what you're looking for is it? I dislike all "Gui builders", as they all produce rigid, reptitive code that is hard to modify correctly, and is not always that effecient when any action to be performed is more than popping up a dialog.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Then that is the compilation error. On which line does that occur.

But I can tell you, that most of the class defination of "Listed" needs to be contained within a Method and not directly under the class.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Compile the project?

Read the manual to find out how, if you must.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

There is more than that. That occurs when you try to execute a project within Eclipse that hasn't been successfuly compiled yet. It would definately help to have the compilation messages.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

It might help to know what these nebulous "errors" are. complete error message with stack traces (where applicable), please.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

At least on Solaris "-u" is the option. For any other system you are going to have to man ls and actually read it to find out if any of the options have anything to do with access time and then actually try that option (and try it in combo with "-l", maybe).

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

IMHO, not really since they are different sites (as long as you keep them all up-to-date with your progress), but many people consider even that cross-posting (I consider cross-posting to be posting on multiple forums from the site), and cross-posting is considered extremely rude. Since "Tom" on site "abc" could take time out of his day to try and help you with the problem, only to find out the "Joe" on site "xyz" (or the same site) already provided all the same pointers (and possibly even completely solved your problem) two days ago, meaning "Tom" has just completely wasted that time of his because you cross-posted a question and didn't even bother to keep them up-to-date with each other.

Edit: Just like Sabre has just given you the necessary pointers at Sun, which you didn't bother here to point out what they were or how (or if) they helped you, so someone here may waste their time reiterating them.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

ArrayList (and this looks familiar. Did you post this same question on Sun? Yes.)

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Huh? An "ArrayList" doesn't do any splitting whatsoever and what you are splitting on is "$$". Are you telling me that you have a String such as

a,b,c$$d,e,f$$g,h,i

And you want to get three list's out of it?

If you want one list that contains "a,b,c" - "d,e,f" - "g,h,i" then use the line above (P.S. you may have noticed I am using List, and not ArrayList. Unless you have some specific method from ArrayList you need to use, I would suggest you do the same.).

If you want three Lists as follows
List1 - "a" - "b" - "c"
List2 - "d" - "e" - "f"
List3 - "g" - "h" - "i"

Then use the new for loop to loop over the "split" used above and use the above statement with "," as the pattern within that loop.

masijade 1,351 Industrious Poster Team Colleague Featured Poster
List<String> list = Arrays.asList(string.split());
masijade 1,351 Industrious Poster Team Colleague Featured Poster

Nope. The real problem is that that code needs to be inside a method. You can't simply code loops and other actions as part of the class definition, but rather as method/constructor/block definitions inside the class.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

If you want to "split up" the initialisation, place the actual processes into private methods and call those methods from the constructors, rather than coding it directly into the constructors.

And "private" is not a mistake. The methods must be either private or final (or both, although that is overkill) to prevent any unintended consequences from any possible polymorphish.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Hi Masijade,
I used the cmd given by you , but its showing this & date isnt changing.

Please help

touch -mt 200911141130.00 f1.sh
usage: touch [-amcf] file ...

I didn't mention, that was on Solaris. On something else the "t" may not be necessary (and is seemingly not on your system), but that decimal point is (when including seconds).

Hi All,
I have another question
Does \n not work in csh?
If not, then how do I get to put my text in a new line...

Please help

echo "${var} \n" >> ${MAIL_FILE}

There is a tutorial at the head of the scripting forum here. Read it.