/** * Copyright (c) 2012-2013 Nokia Corporation. All rights reserved. * Nokia and Nokia Connecting People are registered trademarks of Nokia Corporation. * Oracle and Java are trademarks or registered trademarks of Oracle and/or its * affiliates. Other product and company names mentioned herein may be trademarks * or trade names of their respective owners. * See LICENSE.TXT for license information. */ package com.nokia.example.paint.views.components; import javax.microedition.lcdui.Graphics; /* * Ok button for save dialog. */ public class OKButton extends Button { public OKButton() { super("/dialog_btn_pressed.png", "/dialog_btn.png"); } public void onSelected() { //do nothing } public void render(Graphics g) { super.render(g); g.setColor(0x000000); g.drawString("OK", this.x + (width / 2), this.y + (height / 2) + 5, Graphics.BASELINE | Graphics.HCENTER); } }