Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package custom;
- import javax.microedition.lcdui.CustomItem;
- import javax.microedition.lcdui.Graphics;
- import javax.microedition.lcdui.Screen;
- import javax.microedition.lcdui.TextField;
- /**
- *
- * @author Giliwawaa
- */
- public class AlaaTextField extends CustomItem{
- public AlaaTextField(String label) {
- super(label);
- this.setPreferredSize(240, 20);
- }
- protected int getMinContentHeight() {
- return 20;
- }
- protected int getMinContentWidth() {
- return 240;
- }
- protected int getPrefContentHeight(int width) {
- return 20;
- }
- protected int getPrefContentWidth(int height) {
- return 240;
- }
- protected void paint(Graphics g, int w, int h) {
- g.setColor(255, 255, 255);
- g.fillRect(0, 0, w, h);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment