saad sal

Greenhorn
+ Follow
since Jul 31, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by saad sal

What i would like to know is whether we can resize a picture on a canvas screen. I have an Image object. I display it on the canvas. Now when the user presses a button, i want the image to zoom in. Is there any way to zoom in the image.
17 years ago
well, at first i thought that it was a synchronizing problem, and it was to some extent. However later I found out that my first guess was right. It was the drawImage call that was throwing the exception. Well after finishing synchronizing, all i had to do was to replace the getwidth() and getheight() parameters with image.getwitdh() & image.getheight() etc and the program worked just fine.
17 years ago
thanks I solved the problem. There was nothing wrong with the drawImage method after all.
17 years ago
i am using a .png image, but i dont think that even using a jpeg image would make a difference
[ May 25, 2006: Message edited by: saad sal ]
17 years ago


I am unable to display an image on a Nokia 6630 or a 6680 using the code above. However the image is displayed on a Nokia 6600. Has anyone else encountered the same problem? Is there another way to display an image in the Canvas class?
[ May 23, 2006: Message edited by: saad sal ]
17 years ago
Ok thanks. I guess theres no other way then.....have used the Canvas class to move the mouse on PC screen through a Nokia 6630 .

But now I have another problem. I have to get the initial starting position of the mouse from the PC. I am trying to use


But this limits the mouse within a frame whereas I want this to work on anywhere on the PC screen and set the initial value of x and y.

Could anyone help me with this.
17 years ago
You could edit it externally by opening the .java file in notepad or any other external editor. But be careful, this may give rise to a lot of errors, so backup your code before doing so.
17 years ago
I want to find out which events are thrown when the keypad keys are pressed on a mobile phone. I want to use the up,down,left,right keys for movement. However I am not using a Canvas class and am not showing these events on the mobile phone. Basically I am using these movement keys to a server(Computer) and am using them to control the mouse on the Computer.

Basically, in short, what i want to know is the events OR ascii code that is thrown when a particular key is pressed on the mobile phone.
17 years ago


The exception that comes is java.lang.IllegalArgumentException: im == null!
Could anyone help me figure out why the image object is a null
[ March 15, 2006: Message edited by: saad sal ]
18 years ago
I have created a BufferedImage object using



What I want to do is write this image2 object to the OutputStream.
Should I convert the image2 object into a byte[] first or can it be written directly to the OutputStream object.

ps what i am trying to do is send the image2 object from the server through the OutputStream to the client over a bluetooth connection which has already been established.
18 years ago
If you are using an IDE such as netbeans or any other for that matter, your .class files are automatically created.
18 years ago
Hi again,
I was having some trouble with the BlueCove connection. I have setup the BlueCove on the PC and it is working fine and the server "waits for client connections."
Here is the J2ME code I am using for the client side.


There is no build or run error in the code, but when I run the application it is unable to find any server.
I am running this on a Nokia 6630 whereas the server runs on the PC.

I would appreciate any help i can get.
[ February 05, 2006: Message edited by: Jim Yingst ]
18 years ago
I am working on a similar project in which I have to send images from a PC to the phone. I've came across a similar problem. Check this article out. It may help.

http://java.sun.com/developer/technicalArticles/Programming/compression/

By the way. Are you using J2SE on the PC side? If so what type of connection are you using? RFCOMM?
18 years ago
thankyou both. That cleared out my problem
18 years ago
Well i have both the ".java files" and the "jar file" for the service discovery and stuff. Should i only add the jar file to the class path.


Another question i have is that when i use
"import javax.microedition.io.*;"
Is this like using #include<iostream.h> in C++ OR do i have to add some sort of java header files at javax.microedition.io classpath ?
[ January 27, 2006: Message edited by: saad sal ]
18 years ago