Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
84% Quality Score
Upvotes Received
4
Posts with Upvotes
4
Upvoting Members
4
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
~18.6K People Reached

37 Posted Topics

Member Avatar for spoonlicker

One doesn't not get a degree in computer programming, there is Computer Science, Software Engineering, Computer Engineering to name a few. Any of these degrees will require at least some programming skills, and an individual with on of these degrees could get a job that is primarily computer programming, but …

Member Avatar for Fareena.B
0
483
Member Avatar for mkzamanopu
Member Avatar for techiegurus
Member Avatar for jingda
0
111
Member Avatar for sirlink99

In your drawing class, move is set to 10 and never changes. There are a few ways to fix this the first is: [CODE] //in the Drawing class public void paintComponent (Graphics g){ super.paintComponent(g); //This line calls the parent class, check out inheritance if you need a better explanation move++; …

Member Avatar for JamesCherrill
0
990
Member Avatar for rbjq

Have you tested this program? It looks like your Tile method will keep running until your computer runs out of RAM.

Member Avatar for Rashakil Fol
0
151
Member Avatar for ghsuan

You could try using JLabels instead of JButtons in the GUI, then in the keyListener change the background of the JLabel as needed. Do you have the keyListener defined in the same class as your JButtons? If not you may run into communication problems between the two.

Member Avatar for tunlinaung
0
2K
Member Avatar for kay19

yes, I agree. If you decremented the seconds of 12:12:12, you would get 12:12:11. So I would try something like: [CODE] public void decrementSeconds() { sec--; if(sec < 0) { sec = 59; decrementMinutes(); } } [/CODE] Getting to 0 is the trigger to decrement, not 59. So when you …

Member Avatar for kay19
0
750
Member Avatar for sciprog1

DefaultWeightedEdge.class is a simple edge factory. It is a default way of making your edges. So by calling that you save yourself the trouble of having to make and define your own edge factory. Take a look in the api [URL="http://www.jgrapht.org/javadoc/"]http://www.jgrapht.org/javadoc/[/URL] I hope this helps

Member Avatar for sciprog1
0
217
Member Avatar for jrp370

You have the main method in the MailClient.java. The only way I know to get that error is if you accidentally try to run a class with no main, so I would say try it again and make sure you run the MailClient class.

Member Avatar for jrp370
0
118
Member Avatar for Nirmeen Ased
Member Avatar for jmalbornoz
Member Avatar for e-papa
0
107
Member Avatar for freestyle225
Member Avatar for JeroenvDijk

I can hear the words of my Tech. Writing teacher. "Tech stuff is already difficult to understand, so there is absolutely no reason to make it harder than it needs to be. So apply the KISS principle liberally." I can understand the need for cleaner code especially for large projects. …

Member Avatar for ddanbe
1
593
Member Avatar for lynnajoe

You have a problem in your constructor. You are sending a parameter but you are not using the parameter to set the value of the private variable (private int choice). I added this one line to your code and it ran just fine. [CODE] //inside you constructor public Shapes(int UserChoice) …

Member Avatar for lynnajoe
0
153
Member Avatar for miminj

Please put you code in the code tags, this will make the code easier to read. Have you tried writing any of the code for Student.java? I'm not going to do your homework for you, but I will give you a simple example: [CODE] public class MyMain { public static …

Member Avatar for Akill10
0
235
Member Avatar for Phil++

Do you want to take a String an make a char array out of it? If so, This is one way to do it. [CODE] String name = "Phillip"; char[] arrayName = new char[name.length()]; for(int i = 0; i < name.length(); i++)//.length() is a method for the String class, so …

Member Avatar for mKorbel
0
158
Member Avatar for shookees
Member Avatar for Puertorro

Is userNumber a String?(In the original code it isn't, but after following the posts it might be now) If userNumber is a String, you have to put parenthesis after length because it is a method of the String class Ex. [CODE] if(userNumber.length()<2){ //your code } else if(userNumber.length > 5){ //your …

Member Avatar for mKorbel
0
356
Member Avatar for sirlink99

[CODE] Timer timer_1, timer_2; timer_1 = new Timer(new TimerAction1()); timer_2 = new Timer(new TimerAction2()); //the 2 timers call different methods //define the 2 methods class TimerAction1 implements ActionListener { public void actionPerformed(ActionEvent e) { //whatever you want the first timer to do } } class TimerAction2 implements ActionListener { public …

Member Avatar for mKorbel
0
586
Member Avatar for rude04

masijade is right, since you are new to Java this is just a general structure that I use for Exceptions and Errors, [CODE] public static void main(String[] args) { try { //whatever class call may cause a Throwable Error/Exception //In this case: an instance of the Example class } catch(APossibleException) …

Member Avatar for rude04
0
724
Member Avatar for musikluver4

Have you set the JLabels to any value? Based on the code snippets you've posted, you have instantiated the array, but not the elements in the array. Try, [CODE] for (int i = 0; i < mc.getTermYears(); i++) for (int v = 295; v <= 1; v += 25) { …

Member Avatar for musikluver4
0
7K
Member Avatar for oldezwe

On line 16: [CODE] int listsize = level.size()-1; [/CODE] The last element in an array is always the length(or size in this case) - 1. Your while loop is running one time too many.

Member Avatar for Progr4mmer
0
174
Member Avatar for nickliutw

In your while loop, you have while(0 < 10). O will always be less than 10 so it would never come out of the while loop.You need: [CODE] while(counter < 10) [/CODE] You may want to use doubles for total, grade, and average. Integer division will drop off the decimal(i.e. …

Member Avatar for nickliutw
0
101
Member Avatar for nekromantik

You need to look at the ASCII chart, and figure out what characters your program will look for.(i.e. 65-90 correspond to A-Z, 97-122 correspond to a-z) There is a distinction between upper case and lower case letters. I'll write in pseudo-code to get you started. [CODE] //import the Scanner class …

Member Avatar for nekromantik
0
104
Member Avatar for Taimoor Rana
Member Avatar for Taimoor Rana
0
533
Member Avatar for kiran.bygani

Java doesn't support multiple inheritance because there are logical problems associated with multiple inheritance. Ex. Class1 Attributes: name, age....(ect.) Methods: toString(), ... (ect.) Class2 Attributes: name, number,...(ect.) Methods: toString(), ....(ect.) If MyNewClass where to inherit from both Class1 and Class2, there would be a problem. Does MyNewClass inherit its name …

Member Avatar for Mattox
-1
79
Member Avatar for Pureblood40

It looks like you code is working right, you just don't have a print statement that will make the table. [CODE] for(int i = 0; i < emp1.getCount(); i++) { emp1.getEmployee(i).toString()// } [/CODE] emp1.getEmployee(i) returns an Employee object, the toString() prints out the Employee object. This is how you would …

Member Avatar for Mattox
0
81
Member Avatar for Phinocio

Strings are not primitive types, so you can't use ==. you have to use the .equals("String") Ex. put this in the parenthesis of the if statement [CODE] if(choice.equals("1")) [/CODE] The == operator will only work with primitive types, since a String is an object, you have to use a method …

Member Avatar for Mattox
0
106
Member Avatar for mjavaid

The while loop should terminate when the user enters 0 for the variable value. You need to define value before the loop starts otherwise there will be errors [CODE] value = 1; while(value != 0)//when the user enter 0 the loop will terminate { //lines 11 - 63 go inside …

Member Avatar for mjavaid
0
121
Member Avatar for insanely_sane

Parsing - changes a String into a primitive data type(may be other uses) Casting - changes from one primitive data type to another, can also be used to cast objects. Use, if you have a string and need to convert it into a primitive type us Parsing i.e. [CODE] String …

Member Avatar for Mattox
0
252
Member Avatar for Si_Long

The method toUpper has a parameter, when you call the method you are not sending it a parameter. Line 18 is where you call the toUpper method. This is how is should look. [CODE] toUpper('a'); [/CODE] The reason why I took the System.out.println out of the code is because the …

Member Avatar for Mattox
0
165
Member Avatar for gekkoswave

The String array is a good idea. It looks like you've got everything you need for the stats in the array. Are you trying to print the results in the endGame() method? I ask because you're using outText, but I couldn't find a place where you updated outText with the …

Member Avatar for Mattox
0
145
Member Avatar for Java_90

Your base case for the recursive function covers all the possible outcomes. The reason why it only returns the first element is because that one of the base cases. [CODE] //int i will keep up with which element you are evaluating public String recursionMethod(int i) { File p = new …

Member Avatar for Java_90
0
180
Member Avatar for Katana24

You can also try using the getActionCommand() inside the actionPerformed part of the listener. This function returns a String so you should be able to avoid casting.

Member Avatar for ztini
0
2K
Member Avatar for 24x24

You are going to have to ask the user for 3 different things. 1. What kind of value are they entering (have them enter a char, ex. b for binary, d for decimal, h for hex) 2. What kind of value do they want to convert to. 3. The actual …

Member Avatar for 24x24
0
238
Member Avatar for Taimoor Rana

Check out java.awt.geom in the Java API. The CubicCurve2D may work for you.

Member Avatar for Ezzaral
0
90
Member Avatar for Mattox

Hi, I'm new to DaniWeb, as implied by this self intro. I have an AA in Computer Science and am currently working on BA in Computer Science and am about a year away from graduating. Right now I am spending a lot of quality time with Java. Goodbye for now, …

Member Avatar for AndreRet
0
53

The End.