BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 01-28-2009, 12:38 AM   #1
Sonal Agarwal
New Member
 
Join Date: Jan 2009
Model: 7200
PIN: N/A
Carrier: dnt knw
Posts: 1
Default Error: preverifier failed

Please Login to Remove!

Hello,

I am getting a following error while building my project:

"Error preverifying class com.maq.rim.ui.component.CustomButtonField
java/lang/NoClassDefFoundError: net/rim/device/api/ui/component/ButtonField
Error!: Error: preverifier failed"


I have the following code:

package com.maq.rim.ui.component;

import net.rim.device.api.ui.component.ButtonField;
import net.rim.device.api.ui.Graphics;

public class CustomButtonField extends ButtonField
{
private boolean oldVersion;
private int fieldWidth;
private int fieldHeight;

public CustomButtonField(boolean oldVersion)
{
super();
this.oldVersion = oldVersion;
}

public CustomButtonField(long style, boolean oldVersion)
{
super(style);
this.oldVersion = oldVersion;
}

public CustomButtonField(String label, boolean oldVersion)
{
super(label,ButtonField.HCENTER);
this.oldVersion = oldVersion;
}

public CustomButtonField(String label, long style, boolean oldVersion)
{
super(label, style);
this.oldVersion = oldVersion;
}

public void setFieldWidth(int width)
{
this.fieldWidth = width;
}

public void setFieldHeight(int height)
{
this.fieldHeight = height;
}

protected void onFocus(int direction)
{
this.getManager().invalidate();
super.onFocus(direction);
}

protected void onUnfocus()
{
this.getManager().invalidate();
super.onUnfocus();
}

protected void layout(int width, int height)
{
if (!oldVersion)
{
if ((this.fieldWidth != 0) && (this.fieldHeight != 0))
{
super.layout(this.fieldWidth, this.fieldHeight);
this.setExtent(this.fieldWidth, this.fieldHeight);
}
else if (this.fieldWidth != 0)
{
super.layout(this.fieldWidth, height);
this.setExtent(this.fieldWidth, height);
}
else if (this.fieldHeight != 0)
{
super.layout(width, this.fieldHeight);
this.setExtent(width, this.fieldHeight);
}
else
{
super.layout(width, height);
}
}
else
{
super.layout(width, height);
}
}

protected void paint(Graphics graphics)
{
if (oldVersion)
{
int currentColor = graphics.getColor();
graphics.setColor(Style.BACKGROUND2);
graphics.fillRect(0, 0, getWidth(), getHeight());
graphics.setColor(currentColor);
}
super.paint(graphics);
}
}



Can anybody help me in resolving this error ??
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


3.3ft PT100 RTD Temperature Sensor Probe 3 Wires Cable Thermocouple picture

3.3ft PT100 RTD Temperature Sensor Probe 3 Wires Cable Thermocouple

$18.65



K-Type Thermocouple Probe Digital Thermometer Steel Sensor Spiral Cable  picture

K-Type Thermocouple Probe Digital Thermometer Steel Sensor Spiral Cable

$11.49



Infrared Thermometer, 11:1 Optical Ratio, w/Thermocouple picture

Infrared Thermometer, 11:1 Optical Ratio, w/Thermocouple

$53.55



6802 II Digital Thermocouple Thermometer Dual Channel 2*K-Type Temperature Meter picture

6802 II Digital Thermocouple Thermometer Dual Channel 2*K-Type Temperature Meter

$24.40



Type K Thermocouple Temperature Sensor 2

Type K Thermocouple Temperature Sensor 2"Pipe Clamp 3' Cord Wide Range 350F HVAC

$19.99



-58 to 2372 °F Ceramic Kiln Probe Type K Thermocouple Core Dia 2.0mm picture

-58 to 2372 °F Ceramic Kiln Probe Type K Thermocouple Core Dia 2.0mm

$9.99







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.