Search Results

Showing results 1 to 40 of 53
Search took 0.01 seconds.
Search: Posts Made By: di2daer
Forum: Java Oct 16th, 2009
Replies: 11
Views: 366
Posted By di2daer
I think that you can write a server/client solution to get it to work. The client connects to the server which returns the content of the database. I did something like that when I needed my applet...
Forum: Java Oct 14th, 2009
Replies: 2
Views: 339
Posted By di2daer
Hi,

This is one way to do it:

1. Loop through the array and for all 0's assign its value to -1
2. Store the number of elements that is to be removed, so you know the length of the new array....
Forum: Java Oct 14th, 2009
Replies: 4
Views: 303
Posted By di2daer
I think there is a method called setFullScreen(boolean value) that you can use.
Forum: Java Oct 13th, 2009
Replies: 3
Views: 191
Posted By di2daer
Loop through a string and for every char that is a whitespace increment a counter.
Forum: Java Oct 12th, 2009
Replies: 3
Views: 342
Posted By di2daer
I think you have a little design flaw. The result is not always the first input, and I think that is what is causing the problem. I am not completly sure though. Try to rethink your design with a...
Forum: Java Oct 11th, 2009
Replies: 6
Views: 572
Posted By di2daer
Do you get a security exception when launching the applet? If that is the case you need to sign it before you can run it.

If not, it might just be becuase the image doesn't reside in the build...
Forum: Java Oct 11th, 2009
Replies: 6
Views: 572
Posted By di2daer
How are you running the applet? Make sure that the image is available from where you run it.
Forum: Java Oct 11th, 2009
Replies: 7
Views: 594
Posted By di2daer
Hi,

you should really use code tags when posting code, it is way to hard to read without...
Anyway, the errors I've spotted are:

private String[] keys = ("7", "8", "9", "/",
"4", "5",...
Forum: Java Oct 11th, 2009
Replies: 6
Views: 572
Posted By di2daer
Hi,

I can't see any faults in your code, so my guess is that the program is unable to find the image.
If your folder structure looks like this:
.\src\sess31\myownapplet.java
then place the...
Forum: Java Oct 6th, 2009
Replies: 2
Views: 217
Posted By di2daer
Hi,

J2ME does not have all the standard libraries that J2SE has. PrintWriter and BufferedReader doesn't exist in J2ME.
Maybe you can use DataInputStream and DataOutputStream instead?

You can...
Forum: Java Sep 5th, 2009
Replies: 7
Views: 514
Posted By di2daer
Hi,

Check this:
http://www.j2ee.me/javame/reference/apis/jsr118/javax/microedition/lcdui/Display.html#setCurrent%28javax.microedition.lcdui.Displayable%29

It says that the setCurrent() call...
Forum: Java Aug 19th, 2009
Replies: 4
Views: 691
Posted By di2daer
Hi,

you need to import java.io.*, and also surround with a try/catch clause.

You can also use Scanner to read input.


Scanner sc = new Scanner(System.in);
sc.nextLine();
sc.close();
Forum: Java Jul 18th, 2009
Replies: 8
Views: 608
Posted By di2daer
I meant private class members :$
Forum: Java Jul 17th, 2009
Replies: 8
Views: 608
Posted By di2daer
I think you need to refactor a bit. Refreshing the form will be hard since all the variables are stored inside the constructor, even the input from the user.
Declare all the forms and the...
Forum: Java Jul 15th, 2009
Replies: 2
Views: 295
Posted By di2daer
Hi,

Check the PIM API
http://developers.sun.com/mobility/apis/articles/pim/index.html

I haven't tried anything like it myself though.
Forum: Java Jul 15th, 2009
Replies: 13
Views: 772
Posted By di2daer
Not sure what you want to do, but what is displayed on the axis depends on the Dataset, so modify the dataset accordingly.
Forum: Java Jul 14th, 2009
Replies: 2
Views: 328
Posted By di2daer
You can use LinkedList or Stack:
http://java.sun.com/j2se/1.4.2/docs/api/java/util/LinkedList.html
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Stack.html


LinkedList<String> fifo = new...
Forum: Java Jul 13th, 2009
Replies: 6
Views: 305
Posted By di2daer
Hi,

I think the constructor in class dvdInv is incorrect, loose the void

public dvdInvGui() {
}


Methods has returns types, constructors does not
Forum: Java Jul 10th, 2009
Replies: 12
Views: 460
Posted By di2daer
Forum: Java Jul 10th, 2009
Replies: 12
Views: 460
Posted By di2daer
10 = is an integer
010 = is an octal (base 8)

So 010 = 1000 in binary
1000
0100
------
1100 = 12

I think this is how it works at least :)
Forum: Java Jul 10th, 2009
Replies: 13
Views: 772
Posted By di2daer
How does you file look like that you read from?
This is kinda of a long shot, but try to do a repaint on the chart panel. This is how my listener looks like:

slider.addChangeListener(new...
Forum: Java Jul 9th, 2009
Replies: 13
Views: 772
Posted By di2daer
What do you mean does not apply?
I tried your code and made those modifications, so unless I've completly missunderstood what you want to do, this do apply.
Forum: Java Jul 9th, 2009
Replies: 13
Views: 772
Posted By di2daer
Ok, bear with me, I might be off here but anyway:
First of all, it looks like you don't set the data until the users uses the slider.
Apart from that, I think you need to get the xAxis and set the...
Forum: Java Jul 9th, 2009
Replies: 5
Views: 600
Posted By di2daer
Ignore my post, peter_budo is correct :)
Forum: Java Jul 9th, 2009
Replies: 13
Views: 772
Posted By di2daer
The graphs I've created has been done with JFreeChart, I think it works pretty good for my needs.
I found this link however that might help you:...
Forum: Java Jul 3rd, 2009
Replies: 5
Views: 362
Posted By di2daer
Get the inputs from the user and form the first 2 numbers in the fibonacci sequence, then populate the rest in a loop by sumarizing the previous two numbers. (3+8=11, 11+8=19, 19+11=30 etc)

In...
Forum: Java Jul 3rd, 2009
Replies: 5
Views: 578
Posted By di2daer
whops, thank you for pointing that out :)
Forum: Java Jul 3rd, 2009
Replies: 5
Views: 578
Posted By di2daer
You're missing an import statement for FileOutputStream, other than that, I can't spot any errors with this code. I think you'll have to explain a bit more about when you get this error. In what...
Forum: Java Jul 2nd, 2009
Replies: 1
Views: 200
Posted By di2daer
Please correct me if I am wrong, but I don't think it is possible to send files via the serial connection, but you can use bluetooth or obex for that.
What kind of file do you want to send? If it is...
Forum: Java Jul 2nd, 2009
Replies: 7
Views: 528
Posted By di2daer
Hi,
when you create your array you give it the length of all the characters in the string you're analyzing, but you're not initiaing it, so it contains only null (s2[0] = null, s2[1] = null etc)...
Forum: Java Jul 2nd, 2009
Replies: 12
Views: 790
Posted By di2daer
Surron the path with "" and try again.
If that doesn't work, make sure you have all the dependencies included, separate them with ';'

This works for me:
C:\java\Playground\src> javac -classpath...
Forum: Java Jul 2nd, 2009
Replies: 12
Views: 790
Posted By di2daer
Do you use any editor?
If you're running in cmd prompt I think you need to include the location of the jars when you run it, like: java -classpath C:\jfreechart\jfreechart.jar yourApp.java
You can...
Forum: Java Jul 2nd, 2009
Replies: 12
Views: 790
Posted By di2daer
If you're using eclipse you can choose to add them as external jars.
Right click the project and select build path-> configure build path -> (Libraries tab) add external jars.
Forum: Java Jul 1st, 2009
Replies: 22
Views: 1,291
Posted By di2daer
I didn't read your code very carefully, but this sounds like a problem I experience from time to time. You need to close the file when you're done writing to it. Otherwise you will just create it,...
Forum: Java Jul 1st, 2009
Replies: 2
Views: 671
Posted By di2daer
You need to have support for JSR-75. You're phone most likely has support for it, but you might want to make sure.
On my device (Sony Ericsson) the filesystem is reached through "file:\\\c:\path"...
Forum: Java Jul 1st, 2009
Replies: 2
Views: 306
Posted By di2daer
Im not sure I understand your question, but anyway...
First of all, it looks like you're sleeping the main thread, which will cause your application to freeze for a number of seconds.
I might be...
Forum: Java Jun 30th, 2009
Replies: 2
Views: 972
Posted By di2daer
In drawCircle g is null. That is why you get null pointer exception and that is also why nothing is being drawn.
You need to get the graphics from the Panel which is pressed. You can get this info...
Forum: Java Jun 30th, 2009
Replies: 14
Views: 618
Posted By di2daer
The physics formulas are fairly simple:
F = m*a (a = F/m)
vt = vt-1+a(dt)
pt = pt-1 +vt(dt)

where
F = force
m = mass
a = acceleration
vt = velocity at time T
Forum: Java Jun 30th, 2009
Replies: 14
Views: 618
Posted By di2daer
Hi,

how much realism do you want to add? I mean, real formulas or just something that looks good and works fine for your purpose?

If you just want to slide the character a little distance you...
Forum: Java Jun 30th, 2009
Replies: 1
Views: 244
Posted By di2daer
Im not sure what you are asking for, but this is how you create an inner class:

public class MyClass {

public MyClass() {
// Constructor for MyClass
}

private class...
Showing results 1 to 40 of 53

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC