Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
8
Posts with Upvotes
8
Upvoting Members
8
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
2 Commented Posts
0 Endorsements
Ranked #1K
~34.5K People Reached
About Me

High school student

PC Specs
MacBook Pro 17", 2.5 GHz Intel Core 2 Duo, 2 GB RAM, 1920x1200 LED-backlit display
Favorite Tags

45 Posted Topics

Member Avatar for moderate_rock48
Member Avatar for iamthwee

The Toolkit class provides you with a method [inlinecode]createCustomCursor(Image cursor, Point hotspot, String name)[/inlinecode]. [inlinecode]cursor[/inlinecode] is the Image of the cursor, [inlinecode]hotspot[/inlinecode] is point from the top left corner of the Image where the actual click of the cursor is, and [inlinecode]name[/inlinecode] is just the name of the cursor. Anyway, …

Member Avatar for maquaree
0
623
Member Avatar for soultrav

You'd compare an object to [icode]null[/icode] with [icode]==[/icode]. I think you want one of the following. It's hard to determine the exact behavior you're looking for from your code. [code=Java]if (child == null) child = new Lista(c, null); // Or: if (child.getData() == null) child = new Lista(c, null);[/code]

Member Avatar for Zibo
0
7K
Member Avatar for manisha
Member Avatar for Debadipta
Member Avatar for yadavshubhanshu

Use [icode]==[/icode] to compare values; [icode]=[/icode] performs [i]assignment[/i], not comparison.

Member Avatar for destin
0
55
Member Avatar for Soloz

Your post did not get formatted correctly. Please edit it to use code tags.

Member Avatar for stultuske
0
78
Member Avatar for BestJewSinceJC
Member Avatar for ~s.o.s~
0
199
Member Avatar for VernonDozier

Applets shouldn't have constructors because an applet isn't guaranteed to have a full environment until [icode]init[/icode] is called. So the code you would normally put in your constructor should go into the [icode]init()[/icode] method. Also, things such as width and height of an are automagically pulled from the HTML for …

Member Avatar for VernonDozier
0
107
Member Avatar for MrDiaz

This topic was [url=http://www.daniweb.com/forums/thread155995.html]recently discussed[/url].

Member Avatar for MrDiaz
0
91
Member Avatar for cbickle

Can you edit your post to include code tags please? [[i][/i]code=Java] your code here [[i][/i]/code]

Member Avatar for cbickle
0
110
Member Avatar for janamrob

[QUOTE=dickersonka;732548]masijade is correct, i think its more of a convention to follow though[/QUOTE] It's not just a convention, it's a good programming practice. If you incorrectly attempt to override a superclass's method without the annotation, your error will be [i]silently ignored[/i]. If you do include it, you will get a …

Member Avatar for destin
0
121
Member Avatar for Fiery Demon

[url]http://forums.devshed.com/java-help-9/java-help-plz-569400.html[/url]

Member Avatar for VernonDozier
0
122
Member Avatar for stevenp123

I'll go through each of the errors I see. 1) [icode]new int[5] //Constructing the array[/icode] This line does nothing useful and is missing a semicolon. You should remove the line completely. 2) [icode]int[0] = input.nextInt[/icode] This line should be using the variable name, not the variable type to reference the …

Member Avatar for destin
0
90
Member Avatar for kinger29
Member Avatar for destin
0
109
Member Avatar for AceAtch

[QUOTE=stultuske;729819]I take it getRadius is a method, so call it like a method, not like some static variable[/QUOTE] You mean public variable.

Member Avatar for javaAddict
0
179
Member Avatar for philmetz

Keep in mind you aren't looping here, so the sum variable is not doing anything useful. You can rewrite javaAddict's code to be like this: [code=Java]public static int myMethod(int counter) { if (counter == 0) return 0; else return counter + myMethod(counter - 1); }[/code]

Member Avatar for destin
0
95
Member Avatar for Koldsoul

You have all the right logic, you're just missing half a line. Looks like a silly mistake on your part. [code]char c = word.charAt(0); [b]reverseWord += [/b]reverse(word.substring(1)); reverseWord += c;[/code]

Member Avatar for bobocqu
0
114
Member Avatar for tonief

A superclass must always be constructed before its children. There are two things that are implicit in your MainClass class. 1) Since you did not specify any constructors, you have an implicit default constructor: [code=Java]public MainClass() { }[/code] 2) Since you did not specify which constructor for your superclass to …

Member Avatar for tonief
0
452
Member Avatar for onidarksheik

You have to compare each one explicitly. [code=Java]boolean invalidColor = (FColour != 'B' && FColour != 'L' && FColour != 'W' && FColour != 'R' && FColour != 'Y' && FColour != 'G');[/code]

Member Avatar for onidarksheik
0
2K
Member Avatar for dipsn

Every class has a [icode]hashCode[/icode] method. Just don't use the URL class for this because it's broken. use the URI class.

Member Avatar for destin
0
73
Member Avatar for dimples09

The [icode]java.util.Stack[/icode] class is a legacy class. You should use the [icode]java.util.Deque[/icode] interface instead, which supports LIFO.

Member Avatar for destin
0
74
Member Avatar for MrDiaz

Is this just a syntax question? Because your psuedocode is (nearly) correct. [code=Java]// MyObject is the class of the object you want to compare public boolean(MyObject obj1, MyObject obj2){ if (obj1.getSomeProperty() == obj2.getSomeProperty()) return true; else return false }[/code] Or, more simply: [code=Java]public boolean(MyObject obj1, MyObject obj2){ return obj1.getSomeProperty() == …

Member Avatar for MrDiaz
0
116
Member Avatar for vladdy191

[QUOTE=vladdy191;729445]I'm trying to read in a text file character by character. However, when I try to read it in it using the readChar method in DataInputStream it gives me a IOException. Heres what I have so far [CODE] FileInputStream stream; try { // Open an input stream stream = new …

Member Avatar for destin
0
446
Member Avatar for AirmanTheGreat

The [icode]Math[/icode] class is imported by default; you don't need to import it manually. masijade was suggesting that you [i]look in that class[/i] for a method that might be useful to you.

Member Avatar for destin
0
70
Member Avatar for NycNessyness

Try Googling "validating JTextField." First result was your question covered in depth: [url]http://java.sun.com/developer/JDCTechTips/2001/tt1120.html[/url]

Member Avatar for destin
0
105
Member Avatar for llemes4011

This is what files are for. Just store the data from the non-Java application into a file, and then read that data from your Java application.

Member Avatar for llemes4011
0
203
Member Avatar for smakos
Member Avatar for yawjava

Please post an [url=http://mindprod.com/jgloss/sscce.html]SSCCE[/url] so that it is easier for us to help you. You're posting a lot of extraneous code if all you need help with is removing a node from a linked-list.

Member Avatar for destin
0
142
Member Avatar for dipsn

How can [icode]hashCode[/icode] be returning [icode]null[/icode]? [icode]hashCode[/icode] returns an [icode]int[/icode]. Also, if you are using the [icode]URL[/icode] class, don't. Its [icode]equals[/icode] and [icode]hashCode[/icode] methods are broken. Use the [icode]URI[/icode] class instead.

Member Avatar for destin
0
73
Member Avatar for nouryn
Member Avatar for jsully1

Can you post a [URL="http://mindprod.com/jgloss/sscce.html"]SSCCE[/URL] to demonstrate your problem?

Member Avatar for jsully1
0
103
Member Avatar for phalaris_trip

Just wondering... why do you want to do this? The BigInteger class is immutable, so two instances sharing memory will never be a problem.

Member Avatar for destin
0
1K
Member Avatar for yawjava
Member Avatar for BestJewSinceJC
0
199
Member Avatar for Kakashi

So you need to get input from a user and store it in a text file? By the way, ".txt" is the extension typically used for a text file.

Member Avatar for peter_budo
0
104
Member Avatar for intelli

Being helped already over [URL="http://forums.devshed.com/java-help-9/while-loop-566648.html"]here[/URL].

Member Avatar for destin
0
91
Member Avatar for kinger29

You don't need to use a loop if you take advantage of the API. If you take the length of the array returned "scanning" for your substring with [inlinecode]String#scan[/inlinecode], you will have number of occurrences of that substring.

Member Avatar for destin
0
94
Member Avatar for Jessehk

Here's a recursive one in Java since it seems no one has done one recursively or done one in Java. [b]Java[/b] [code] public static void main(String[] args) { System.out.println(count(1, 10)); } private static String count(int min, int max) { if (min > max) { return ""; } else { return …

Member Avatar for Maidomax
0
989
Member Avatar for demonhunter777
Member Avatar for totalnewb++

[QUOTE=totalnewb++]this is the email I recieved from her: the function should get its input from the parameter list, not directly from the user. For most functions, there shouldn’t be anything that deals with computer’s user interface such as keyboard or monitor. Please change this program and resend. Thanks. Thank you …

Member Avatar for destin
0
122
Member Avatar for Shaun1987

You can just add a listener to each button. [code] JButton[] buttonArray = new JButton[25]; for (int i = 0; i < buttonArray.length; i++) { buttonArray[i] = new JButton(String.valueOf(i + 1)); buttonArray[i].addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { System.out.println("actionPerformed(ActionEvent)"); } }); // maybe set location of buttonArray[i] // maybe …

Member Avatar for Shaun1987
0
185
Member Avatar for ben1977

[QUOTE=fdrage]for a start tidy your code up... declare all the variables at the top before even using them[/QUOTE] No, don't declare all your variables at the top. Declare them at the beginning of their scope. Eg: [quote=Java's Coding Conventions][code] void myMethod() { int int1 = 0; // beginning of method …

Member Avatar for fdrage
0
99
Member Avatar for tripnip

Your syntax for if statements is wrong. The syntax is as follows: [code] if (someCondition) { // do something }[/code]

Member Avatar for tripnip
0
206
Member Avatar for destin

My title might be a bit misleading; I've created many games before and did know where to start with those. Now, after creating many easy arcade games (pong, tetris, hardball, and several fight games), I'm getting bored. I would like to start writing a RPG. I don't plan on the …

Member Avatar for jwenting
0
238
Member Avatar for porterrj

[QUOTE=porterrj]void displayStars (int rows, int cols) { for (int across = 0; across < rows; across++) { for (int down = 0; down < cols; down++) cout << "*"; cout <<endl; } }[/QUOTE] Well... You need to check for conditions. [code] void drawRect(int width, int height) { for (int i …

Member Avatar for porterrj
0
1K

The End.