View Single Post
Old 06-29-2009, 01:43 AM   #8 (permalink)
Morion
Knows Where the Search Button Is
 
Join Date: Jun 2009
Location: Belarus, Minsk
Model: none
PIN: N/A
Carrier: none
Posts: 17
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, sorry for late post. Here's my code.
Code:
public class Screen extends MainScreen{
	private Bitmap backGround; 
	
	public Screen(){
		super(NO_VERTICAL_SCROLL);
		setTitle("This is a test");
		createUI();
	}
	
	private void createUI(){
		backGround = Bitmap.getBitmapResource("bg.jpg");
	        add(new LabelField("YO!", USE_ALL_WIDTH ));
	}

	protected void paintBackground(Graphics graphics){
		graphics.drawBitmap(0, 0, Display.getWidth(), Display.getHeight(), backGround, 0, 0);
		super.paintBackground(graphics);
	}
	
	
//	protected void paint(Graphics graphics){
//		super.paint(graphics);
//	}

	public boolean onClose(){
		Dialog.alert("Bye!");
		System.exit(1);
		return true;
	}
Offline   Reply With Quote