J2ME Application Example-a simple calculator implementation (with source code)
Using the low-level user interface to make a simple calculator based on the Nokia S60 series, we hope to help. This article only contains the program code, if you need picture files and source code please send me an e-mail: cqucyf@263.net
The source code is as follows
Calcmidlet.java
Package My.calc;
Import javax.microedition.midlet.*;
Import javax.microedition.lcdui.*;
Fade in J2ME, as far as I know there are at least three ways.
The first is to get the pixels that need to transform the picture, set the alpha channel value of each pixel in turn, and let it change between 0~100.
The second is to modify the color palette data of the image so that it changes between the palette's original data and 255.
The third, in fact, is also the use of the above method, first painting the picture, and then overlay a black rectangl
bothers you and me that countless developers have headaches. So frankly, it's too far away from all the good tomorrow. There is also the lack of our creativity, we continue to repeat our PC play some games. So now is not the time to be greedy, tell the truth if you are a player, will be willing to spend money to buy a just the name of a good phone game? So deep developer, is also creative person you, really should think well, you face is far inferior to GB mobile devices. Even after 10 years, m
On the first day of the job today, Chen Zexin and I told a part of the knowledge about this part, the main analysis of the Java EE and J2SE, first J2SE and. NET are some of the basic knowledge of programming, classes, objects, (front-end???? )Java EE is an enterprise-class application knowledge, mainly by 1. Application 2: Container (Tomcat WebLogic) 3: ComponentAlso told a part of the knowledge, where the thread is how to use, the use of several ways of threading, Meng in fact, this review many
Just recently learning Java, you need to configure a J2ME development environment
The installation process encountered a lot of problems, I hope the expert guidance:
The version of Eclipse installed is Eclipse-sdk-3.3.2-win32
The eclipseme version of the download is Eclipseme.feature_1.7.9_site
However, the option cannot be found during the installation of Eclipseme
From the Internet to say that the new version of the Eclipseme does not have
Originally I introduced the j2me of the low-level graphics interface canvas want to jump directly to the game development API, but for the integrity of the content, I decided to put the advanced graphical user interface a brief introduction. But the point is not the same, I will not be very detailed how to use the various classes, I just wanted to show you the visual development of NetBeans and the advanced graphical user interface on the phone's perf
We are programmers, we do not have all kinds of social intercourse, computer and network is our whole world. How do we entertain ourselves while we work? Think of us every day on the waistband of the mobile phone, and then think we are very familiar with Java, then, why don't we write a few J2ME mobile phone programs to play it?
First, we need to build a development environment. Both Eclipse and NetBeans are good choices. I am here to select the NetB
Some time ago contacted some digital image processing problems, under the guidance of 1 senior, in the J2ME platform, completed some basic 2D image processing algorithm. As a summary of this knowledge, decided to write out these algorithms, and friends to explore together. This article first introduces the realization of image amplification, the program is based on the Nokia S40 machine for the platform implementation.
1, the realization of the basic
In J2ME programming, in order to reduce the size of the file, often a similar small picture merged into a file, when the program is actually drawing, you can display only a part of the picture of the file as needed. The SetClip method in graphics is to implement this function.
The principle of the SetClip method is to display the contents of a picture exactly in that part by displaying only a portion of the content on the screen.
The SetClip method
Briefly
Now, mobile games and mobile apps are very popular! The game needs to have fashionable and beautiful graphics, its design standard is higher than any time before. This article will show you how to use the cool mobile 3D graphics API to develop 3D graphics games for J2ME devices.
If you're programming with MIDP1.0, there are two paths you can choose from: Using advanced UI classes or starting from scratch. As game developers, the first option
Recently, it seems that the A-RPG game is very popular on mobile phones, of course, I recently also help the company to write a A-RPG class game. I've never written a game like this before, and it's written out from there to nothing. Also encountered a lot of problems, including the screen scrolling map title array index Calibration, the entire game frame, map data processing, layered processing, the protagonist skills processing, touch detection.
These questions are free I'll do it as a small t
Original Address http://javaeye.5d6d.com/thread-171-1-1.html
J2ME to realize the transparency effect of the picture
Transparent effect of the design, is the development of the game and the UI of the talk about topic, younger brother sorted out on the transparency effect of the whine, interested friends can see
Code
/**
*
* @author Jagie
*
*/
public class Shadowmidlet extends MIDlet {
Canvas C = new Shadowcanvas ();
Public Shadowmidlet () {
}
pro
The program game engine has a lot of structure, but it is basically implemented in a game master loop. The main loop inside the program contains the most important structure of the program framework. J2ME programs typically contain two class files, one is MIDlet, and the other is displayable. I usually put the main code of the game in displayable this class. This class is an event-driven program that has three main corresponding functions void paint (
In J2ME, the processing of sound requires the use of the mobile Media API (MMAPI), which is a MIDP1.0 optional package that is already contained in MIDP2.0. So if you use MIDP1.0, make sure your running environment is supported.
General mobile phone support for the sound file format for WAV, Mid and mpg. Please refer to your mobile phone documentation for details.
In the sound processing, there are many ways to deal with, here is the most commonly u
Clock in the game development, sometimes we need a clock to record the game time, if the end of time to end the game. This article describes how to use timer and timertask to implement such a clock in J2ME and give specific code examples.
There is a TimerTask class in the Java.util package that you can extend this class and implement his run () method to write our logical code in the Run () method. If we want to make a game clock, then very simple we
In J2ME programming, in order to reduce the size of the file, often a similar small picture merged into a file, when the program is actually drawing, you can display only a part of the picture of the file as needed. The SetClip method in graphics is to implement this function.
The principle of the SetClip method is to display the contents of a picture exactly in that part by displaying only a portion of the content on the screen.
The SetClip method
Design
J2ME submarine War Game design and implementation Demo
Huangyu (www.hyweb.net)
Summary
This paper gives an aircraft shooting class (submarine) game design process and the corresponding flow chart, and provides a demo version of the source code download address, the game in the Sun WTK v2.2 debugging Pass.
Statement
Most of the resources used in this game do not belong to the author, the code is for non-commercial use of learning reference.
Notes | response J2ME Development NOTES-keyboard response
Different models respond differently to keyboard events. After my test, Nokia 7210,3100 can only accept one key message at a time. (I wrote a test program, found that if a key is pressed and not released, then the Keypressed event will not be generated, that is, the other keys of the press operation is not valid) so, with the buffer processing control elf movement, if the regulation can only
Comparison in the J2ME of low-level user interface programming, event handling is one of the most frequently used techniques, because the processing of mobile phone keyboard key event is the most commonly used, so take this as the center, introduce the actual use of the process of three ways to explain:
1, Cover keypressed method
In the interface that inherits the canvas, if you need to handle the key, we only need to overwrite the canvas class insi
As is known to all, J2ME programs are published in the form of OTA, data line transmission, infrared and Bluetooth transmission. Here is a brief talk about how you can publish your program via OTA.
OTA is over the air shorthand, that is, through the network download, this is the main form of release. Now the Treasure box is used in this form.
There are several steps you can take to publish a program using OTA:
1. Add MIME support for Jad and jar fi
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.