2,443 Posted Topics

Member Avatar for Mongooseman

JApplet is a "top-level" widget, and getContentPane() returns the JPanel (which is a Container) to which items could be added. Do you understand the "extends" keyword, and, if so, did you bother to read the API docs for that getContentPane() method, which is the one returning the container?

Member Avatar for masijade
0
233
Member Avatar for boyz
Member Avatar for Mr.UNOwen
Member Avatar for nedimavci
Member Avatar for jwenting
-2
135
Member Avatar for mizcomscie

And? What is this for? What is it suppossed to be, other than a procedural program masquerading as a Java program? Did you have a question? Or did you simply want to show the world that you 1) Have no idea what OOP is 2) Have no idea how to …

Member Avatar for majestic0110
0
132
Member Avatar for leroi green
Member Avatar for virividivici

You can't. The JSP runs on the server, JavaScript on the client. The only thing you can do is set a parameter and submit a form (or something to that effect).

Member Avatar for masijade
0
69
Member Avatar for hidash_in
Member Avatar for hidash_in
0
182
Member Avatar for palcham

A Loop, counter, an if statement, a Calendar and its add(int, int) and get(int) methods, and its day of the week named constants. Read the API docs for Calendar, then try to whip something up based on the above, and if it doesn't work, post it, and we'll help you …

Member Avatar for masijade
0
488
Member Avatar for sunny_b

I really hope that you (and most definately I) never have to work with any of the bums, I mean students, you help cheat, I mean tutor, their way through their classes.

Member Avatar for jwenting
0
271
Member Avatar for eleonora

[QUOTE=aan@ucsc;488813]create a object ab using InputBufferedReader method. .... read() reads a character by character from the input. [/QUOTE] If you mean BufferedInputStream then no. It reads byte by byte, which is not necessarily the same thing. If you mean BufferedReader, ok. But there is no such thing as an InputBufferedReader …

Member Avatar for eleonora
0
393
Member Avatar for 71monaro

Well, all the args come as String first and they will (or should) all start with "-". So, chop the first character of the String (if it is not "-" then return an error and exit). Then chop the next character (charAt()) and run that through a switch statement. i.e. …

Member Avatar for masijade
0
107
Member Avatar for Jananee

How about this one: "What I did all year, rather than even attempt to come up with a final project."

Member Avatar for raja baba
0
98
Member Avatar for claudiu_is

You should be using forward, and not redirect. The user should only ever see the url he originally clicked on then. Also, use filters to perform the authentications, not the JSP itself.

Member Avatar for claudiu_is
0
99
Member Avatar for sandy183

I assume your login assigns a session. If so, than on logout do session.invalidate() Pushing back on the browser may still show the site but it should only be a version of the site in the cache. If the user tries to actually submit anything, or reload the site, it …

Member Avatar for shajidbasha
0
230
Member Avatar for shweta797

We would if we had any idea what you were talking about. Provide the relevant table information, and the code you're using to access it, and a better description of exactly what you expect as compared to what you get.

Member Avatar for shweta797
0
118
Member Avatar for eleonora
Member Avatar for masijade
0
87
Member Avatar for hidash_in

Wow, you seem to have finally taken the hint. Good job. But, back to this code. 1) you should use [inlinecode](fileSize > counter)[/inlinecode] otherwise you will wind up skipping the last bit of data in the file. 2) read(byte[]) is not guaranteed to fully read the entire size of the …

Member Avatar for masijade
0
429
Member Avatar for abar_sow

In your ReplaceText class, in the saveOutput method found in the file FindNoun.java line 92 you are using a variable that is not defined (or is defined with null). Which is, of course, exactly what the error message says.

Member Avatar for masijade
0
120
Member Avatar for aan@ucsc

What part of "No" did you not understand? The "N" or the "o"? A Java program can be converted to a native executable, however this looses all of the advantages you had from using Java in the first place, and the created native programs are, usually, no where near as …

Member Avatar for Ezzaral
0
128
Member Avatar for naps

Measure the volume methane produced by drying cow dung and try to figure out how many more times a cow has to take a dump before a catastrophic climate shift results.

Member Avatar for masijade
0
82
Member Avatar for mickinator

Who gave a negative reputation for this response? Anyone should be thankfule to read it, as it explains a lot about the problem. My God, some people are just not sensible.

Member Avatar for mickinator
0
284
Member Avatar for Jezarel

Well, sort date objects rather than date strings and you wn't have this problem. Use SimpleDateFormat to create actual date objects from the date strings, then sort those.

Member Avatar for Ezzaral
0
74
Member Avatar for soso30

[QUOTE=soso30;484570]dear all, i want to build applet viewing video from an ip camera which gives video type MPEG-4. how can i build that application?[/quote] By coding it? [quote]which api i need to work with?[/QUOTE] Well, if you're going to use Java, I would say to start with the JDK.

Member Avatar for masijade
0
122
Member Avatar for kdelorme2005

[QUOTE=jwenting;484736]I've seen a lot of mad software.[/QUOTE] Really? I find mad programmers to be more common. And that in every possible meaning of the word mad. ;-)

Member Avatar for masijade
0
68
Member Avatar for pickachu

In other words, read the API docs for Integer and its parse methods, and see if there is something there that can help you. And find out what the difference between a char and an int is, as you can use a char as an int (as you've done here), …

Member Avatar for Black Box
0
111
Member Avatar for mrityunjay22
Member Avatar for Dio1080

It might help to know what you expect, and what you get, as well as any errors that are occurring. But, thing, if you are passing a boolean already then the == is redundant. Simply do [code] if (O) { [/code]

Member Avatar for Dio1080
0
91
Member Avatar for Danii

That's a (unholy) mix of a class definition with a constructor definition. Example: [code] public class ClassName { Type var; public Classname (Type arg) { this.var = arg; } } [/code]

Member Avatar for ~s.o.s~
0
192
Member Avatar for freakhina
Re: hey

Here's my contribution: Next time do your homework (or maybe its your job) rather than go out drinking, and you won't be in this situation, and so won't be in the position of possibly having the capabilty to go out drinking cut-off completely.

Member Avatar for jwenting
0
82
Member Avatar for alpakr
Member Avatar for tactfulsaint

[QUOTE=ithelp;480813]You can not code website using java, try some server side language like asp/php[/QUOTE] I'm sorry (no I'M not), but BS. What is JSP? What do those three letters stand for? What are Servlets programmed in? What are they?

Member Avatar for masijade
0
206
Member Avatar for rickster11

Of course, if its boolean, you don't need the == either. Simply while(correctName), you do realise that the result of an == is true or false, which is the exact value of the variable being checked, right?

Member Avatar for masijade
0
143
Member Avatar for hidash_in
Member Avatar for kahaj
Member Avatar for skelly16
Member Avatar for mrityunjay22
Member Avatar for lookof2day
0
140
Member Avatar for shers

This forum is meant for unix shell scripting. There is a forum for vb here, and this question should be asked there. I have already asked the admins to move this.

Member Avatar for sandeep_chalke
0
128
Member Avatar for tanalam

[code] for i in `grep "/\\*" file.c`; do [/code] You need to escape the escape character when doing this inside of the expression quotes. Edit: Which, I believe, is what ithelp meant, but he mistakenly used /// instead of /\\.

Member Avatar for masijade
0
126
Member Avatar for summersa

[QUOTE=Jishnu;475596]>System.out.printf(inventory[counter].toString()); I do not think there is any function like printf in Java. It should be either print or println.[/QUOTE] As of 1.5, yes there is, but it is not used in this manner. You need to pass it an optional locale object, a format pattern string, and an array …

Member Avatar for arumugam4all
0
163
Member Avatar for cullguy
Member Avatar for pickachu

To tell you the truth, you would be [i]much[/i] better off using an ArrayList, otherwise, place this code into a method that accepts an array and an element as arguments, and returns an array, then call this method for each element to be removed (is one fairly inefficent way). Or, …

Member Avatar for masijade
0
80
Member Avatar for bilalb1

then do [code] find / -wholename='somename' -print | tee -a filename [/code] Edit: Although I am not familiar with "wholename" argument, I assume your find options are actually something different (and correct).

Member Avatar for bilalb1
0
232
Member Avatar for davidianstyle
Member Avatar for sanjay goyan

You can also, as long as it is not csh or sh, just simply do var=$(( 2 + 4 )); var=$(( $var + 2 ));

Member Avatar for masijade
0
106
Member Avatar for bluej

setting the preferred size on the components before calling pack would also resolve the issue without having to remove the call to pack (which you shouldn't do).

Member Avatar for masijade
0
146
Member Avatar for chetah

Although all you really need to do is look at his moniker to find out what he wants here. "chetah" when sounded out is the current "slang" sound for cheater. The "street" sound for "er" is, now, almost always "ah".

Member Avatar for chetah
0
81
Member Avatar for chetah

because you do [code] Node top, np, last; [/code] Then, the very next time last is seen, it is in the else block and you are attempting to dereference it. [code] } else { last.next = np; last = np; bigInt = in.nextInt(); } [/code]

Member Avatar for Jishnu
0
82
Member Avatar for everlast

There is a tutorial tacked to the top of this forum. A script can do just about anything, and they are very useful to linux users (at least those that work on the command line, as you can use them to combine many common tasks that are usually performed together …

Member Avatar for everlast
0
79
Member Avatar for ronghel

because 2 != 222 or 22. If you really need to match each digit, then you need to parse each digit of the number as an Integer, rather than the entire String, of course. Try to work something in, in between the readLine and the parseInt and then, if it …

Member Avatar for Ezzaral
0
280

The End.