1,678 Posted Topics

Member Avatar for WASDted

Is this really about kids being banned from playing games? Or is it about regulating which games can and cannot be sold in the U.S.? I could care less what games kids can buy. And their parents can buy the games for them, if they so choose.

Member Avatar for jwenting
0
243
Member Avatar for evak77

[TEX][code=Java]Your code goes here[/code][/TEX] Do that. Clicking the "#" button will do it automatically for you.

Member Avatar for DeadSoul
-1
104
Member Avatar for Fadorn

This should have been posted using a normal thread. Only working example code should be posted as code snippets.

Member Avatar for Fadorn
0
104
Member Avatar for cppnewb

My first guess would be because that code is JQuery and this is the Java forum, whereas JQuery is written in Javascript.

Member Avatar for BestJewSinceJC
0
77
Member Avatar for camdaddy09

This is incredibly insulting. Do you honestly think we are this stupid? Please, do yourself a favor and don't post here again. Also, regardless of my level of rust, I'm sure I could handle this joke of a program. You seriously can't do it yourself?

Member Avatar for BestJewSinceJC
-2
151
Member Avatar for ubi_ct83

I don't understand the algorithm you just posted.. do you need Java help or just help with your algorithm, or both? If you only need help with the algorithm then 'Computer Science' would be a better forum for this question IMO. Either way, if nobody else replies soon, maybe you …

Member Avatar for ubi_ct83
0
80
Member Avatar for luttinj

Agreed - I'm pretty sure Applets use the init method to start, not main. Your "Applet" also contains standard Java code that would print to the console, whereas it should get input via a GUI. And use JApplet not Applet [url]http://java.sun.com/docs/books/tutorial/uiswing/components/applet.html[/url]

Member Avatar for BestJewSinceJC
0
159
Member Avatar for skyzer

"this" refers to whatever Object called the method you are currently in. If the method that you are currently in is a constructor method, then "this" refers to the Object that you are creating.

Member Avatar for BestJewSinceJC
0
109
Member Avatar for Democles

[CODE] public class ContinueTest { /** * @param args the command line arguments */ public static void main(String[] args) { for(int count =1; count <= 10; count ++) { if(count != 5) System.out.printf("%d", count); } System.out.println("\nUsed continue to skip printing 5"); } } [/CODE] .. You can also use System.out.print(count); …

Member Avatar for BestJewSinceJC
0
122
Member Avatar for bigsurya

It's legal to overload any method anywhere, but it probably won't do what you want. What you're supposed to do is [I]override[/I] the run method. See [URL="http://java.sun.com/docs/books/tutorial/essential/concurrency/runthread.html"]here[/URL]

Member Avatar for BestJewSinceJC
0
133
Member Avatar for the_preface

[CODE] import java.util.Scanner; import java.util.InputMismatchException; public class TourPrices { public static void main(String args[]) { Scanner scan = new Scanner(System.in); int tourPrice = 0; boolean ok = false; do { try { System.out.println("Enter a score"); tourPrice = scan.nextInt(); if(tourPrice >= 29.95 && tourPrice <= 249.99) ok = true; } catch(InputMismatchException …

Member Avatar for the_preface
0
126
Member Avatar for kiyu2keith

System.exit(0); [url]http://java.sun.com/j2se/1.4.2/docs/api/java/lang/System.html[/url]

Member Avatar for kiyu2keith
0
78
Member Avatar for BestJewSinceJC

I was going to post this in the linux/unix board, but there is no 'start new thread' button. Why is that? Anyway, I'm going through a ton of steps to apply a patch file. Everything in the patch file seems to apply seamlessly, with one exception. My patch file is …

Member Avatar for BestJewSinceJC
0
65
Member Avatar for vextorspace

If you dispose a parent component you also automatically are disposing of all the child components. Presumably you're calling dispose() on the outer JFrame, which is causing the inner one to disappear? If you want to remove the JFrame, you can just call [ICODE]firstJframe.remove(otherJFrame);[/ICODE] and it will be removed automatically. …

Member Avatar for BestJewSinceJC
0
88
Member Avatar for bigsurya

You declared an array of "n" College Objects, but you did not initialize it. You must create a new Object at each index before you can call methods on it. Also, post a regular thread in the future, not a code snippet.

Member Avatar for bigsurya
0
132
Member Avatar for ubi_ct83

Use methods. Your example and explanation are convoluted and I can't give more specific advice, but to "do something" under certain conditions (i.e. in a control structure such as a for loop, if statement, etc) you can call a method.

Member Avatar for ubi_ct83
0
154
Member Avatar for tedsu

Post using code tags in the future. It's the little button that looks like a # sign on the reply box. Put your code inbetween the brackets that show up after you click it. Anyway, you should also give more information here. Can you not read from the file, or …

Member Avatar for moutanna
0
159
Member Avatar for Dave Sinkula

I don't think the act of opening or closing this thread has anything to do with Dave either way. edit: But of course I do agree that it should be treated/closed under the same circumstances as any other thread.

Member Avatar for jephthah
0
6K
Member Avatar for Techwriter10

Ron, I agree with your point that the president's statement was foolish. The president implies that information is a distraction and a diversion. He ignores the key point that the devices he lists (and others that he alludes to) are a means to spread information, and do not control how …

Member Avatar for Techwriter10
0
624
Member Avatar for khess

Jake.. The OP was obviously talking about Linux included when he said Unix. [QUOTE]- Indoctrinating a whole generation of IT workers with the "windows way" to the exclusion of all else. Take a look at the curriculum of your local tech certification centers, community colleges, and vocational tech schools. Look …

Member Avatar for BestJewSinceJC
1
509
Member Avatar for wildplace

Be clear with your questions, instanceof is a specific java statement that can be used (for example) in the following way: [CODE] if (x instanceof y){ System.out.println("Cool"); } else System.out.println("No runtime error or compiler error here."); [/CODE] And btw, I did understand your question after I read the quote, I'm …

Member Avatar for wildplace
0
241
Member Avatar for HiHe

A device called HiHe that parses posts from [URL="http://www.programmingforums.org/thread26709.html"]this site[/URL] and reposts the barely reworded content on Daniweb.

Member Avatar for Lardmeister
0
147
Member Avatar for bandlife
Member Avatar for jwenting
0
122
Member Avatar for student.09

[QUOTE=jwenting;1207965]validation rules are invalid, solution rejected.[/QUOTE] Yeah, but the validation rules for email addresses are quite complicated and I doubt the OP has made up the rules posted above, they are created by his teacher.

Member Avatar for sawant_nitesh
0
275
Member Avatar for Techwriter10

"3. Apple has very bright people and extremely good lawyers that are well-paid out of Apple's 40 Billion Dollar Cash Pile. Any antitrust allegation is just BALONEY. Move on." That doesn't seem to be what the Department of Justice or the FTC think. Why would I give your opinion more …

Member Avatar for Techwriter10
0
471
Member Avatar for moroccanplaya

Read on google and figure this out yourself. If you know how to pass by reference, declare a function, pass by value, subtract two ints, and use if statements to compare ints, then you can definitely solve this problem. If you can't do any of those things then read any …

Member Avatar for Nick Evan
0
133
Member Avatar for black_berry

You can declare and initialize your arrays all at once like this: [CODE]int[] jobs = new int[4];[/CODE] When you read input using Scanner, you should ensure that your program does not crash by using: [CODE]if (keyboard.hasNextInt()){ myInt = keyboard.nextInt(); }[/CODE] Calling Arrays.sort() on line 24 in your code doesn't do …

Member Avatar for ACW1989
0
725
Member Avatar for sharathk60
Member Avatar for moutanna
0
120
Member Avatar for luvthug

[QUOTE=luvthug;1209394]What I wan to acheive is. the that is typed in aswell as it should display on screen and should be written to a file and each string should be on a seprate line. So * the asterik terminates the program but thats the only thing which appears in the …

Member Avatar for charlieruns
0
175
Member Avatar for Geodude0487

This problem is teaching you about method overriding and how it is an important part of Inheritance. For example, your baseball's play() method should print "Playing America's past time" to the user, the Basketball class's play() method could print out "Playing Basketball", etc. The same goes for the bounce() method …

Member Avatar for Geodude0487
0
125
Member Avatar for Ancient Dragon

As amusing and ironic as I find this, I don't think "500 Internal Server Error Servlet processing error java.lang.NullPointerException at com.thruport.jbird.core.JBirdFilterChain.doFilter(JBirdFilterChain.java:36) at com.thruport.jbird.core.JBirdContext.processRequest(JBirdContext.java:1989) at com.thruport.jbird.container.JBirdRequestHandler.execute(JBirdRequestHandler.java:159) at com.thruport.jbird.server.TcpConnectionHandler.run(TcpConnectionHandler.java:56) at java.lang.Thread.run(Thread.java:619)" Should be at the top of the Java forum.

Member Avatar for Dani
0
116
Member Avatar for elmisti

Have you seen [URL="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet130.java?view=co"]this article[/URL]? Keep in mind that if you run your "long running task" on the event thread then that is probably why the cursor is not changing... If that isn't helpful, sorry, but you'll probably have a lot more luck asking this on an Eclipse RCP specific …

Member Avatar for elmisti
0
118
Member Avatar for handrews3583

You have the words "end if statement" in three different places so that isn't very helpful. You've stated that the error is at line 160 but you only posted 130 lines of code. Post your errors and be specific about which lines of code they are at.

Member Avatar for otherdummy
0
3K
Member Avatar for nick.falconer

What happens if there is a "*" at row 0? Then wouldn't your code attempt to check row "-1", which doesn't exist? Similarly, if a row is at the end of the array, it looks like your code attempts to check ARRAY_END + 1, which is an index that doesn't …

Member Avatar for nick.falconer
0
103
Member Avatar for Chrisjj

As long as it gets the point across I could care less if Dani calls it No-No's

Member Avatar for diafol
0
783
Member Avatar for FJones
Member Avatar for jiten_raulo
Member Avatar for jiten_raulo
0
107
Member Avatar for black_berry

Then remove or poll() the queue until you've looked at every element. Compare the smallest element found thus far to the current element, and set the smallest to the current if you find a smaller one.

Member Avatar for ~s.o.s~
0
111
Member Avatar for kibong

The real solution to this problem would be to use a boolean variable hasBeenUsed and set it to false initially. Then once your array is used, set it to true. That way you can check the variable later to see if it was ever used.

Member Avatar for BestJewSinceJC
0
135
Member Avatar for lashbandi

[QUOTE=lashbandi;1193208]I am suppose to write a method that checks whether a string is a valid password. The password rules are: 1.) A password must have atleast 8 characters 2.) A password consists of only letters and digits 3.) A password must containt 2 digits I need to write a test …

Member Avatar for BestJewSinceJC
0
949
Member Avatar for student.09

Threads are never deleted for database reasons. It would also help if, in the future, you mark threads solved once you are done with them, and post what you did to fix the code, that way people don't come in with the intention of helping you solve your problem and …

Member Avatar for BestJewSinceJC
0
104
Member Avatar for LucarioWill

As far as I know, you should be extending JApplet, not Applet, and if you are expecting this to run in a web environment, your teacher should not have to do anything other than going to the correct website with a Java enabled web browser. You'd have to embed the …

Member Avatar for BestJewSinceJC
0
164
Member Avatar for The Dude
Member Avatar for ttboy04

Then you either have to call Piggy.SampleB() or from within the SampleA() method, you have to call SampleB(). Btw, methods should be named in camelcase starting with a lowercase letter: nameMethodsLikeThis() and Objects should be named the same way (although Objects, preferably, should have pretty short names).

Member Avatar for ttboy04
0
157
Member Avatar for ismithx

What are you trying to accomplish? You can create a JPanel and show it dynamically by adding it to a JFrame or to another JPanel.

Member Avatar for BestJewSinceJC
0
143
Member Avatar for Protoroll

Moutanna's suggestion was a good one; break in this case would be a good idea. If you don't want to use break, though, you can use a for loop and make one of the conditions a boolean. Set that boolean to true once you find the value so it will …

Member Avatar for Protoroll
0
126
Member Avatar for ana_eht

In addition to what moutanna said, you should be wary of bad user input. For example, before you call nextDouble() you should verify that there is actually a double present in the input by calling hasNextDouble(), which returns true if there is a double that can be read in. Oh, …

Member Avatar for ana_eht
0
130
Member Avatar for tquiva

[CODE] while ( a != 0) { total += a; }[/CODE] This bit of code doesn't make sense. "a" is an array of doubles. So when you say "a", "a" is a reference/memory address. If you want to access the [I]value [/I] stored in "a" you have to change the …

Member Avatar for jonsca
0
509
Member Avatar for rciprogrammer

You have to create a new Object of that classtype i.e. dataClass dc = new dataClass();

Member Avatar for rciprogrammer
0
128
Member Avatar for jaku78

You never initialized the instance variable "lbl" which is declared on line 14 above. At line 21, you declared and initialized a [I]different[/I] variable that is also called "lbl". But inside your actionPerformed method, the "lbl" that it is trying to call setText() on is the "lbl" that you declared …

Member Avatar for jaku78
0
138

The End.