hi every1
My first problem is that i added a label to the theme i created,but the label is having a border around it.This border is having the colour of theme.
My second problem is that i added an exit button to the theme,but it was immediately placed on the left hand side.the button is the only command i want to add to theme and i want it on the right side.I also dont know if it is possible for the button to be added without the horizontal bar that comes with it.
My code is below:
public class Ruwwa extends javax.microedition.midlet.MIDlet implements ActionListener{
Form f;
Button mybutton1;
Button mybutton2;
Command Exit ;
public void startApp() {
Display.init(this);
f = new Form();
f.setLayout(new CoordinateLayout(200, 200));
try {
Resources r = Resources.open("/mairuwa.res");
UIManager.getInstance().setThemeProps(r.getTheme("Mairuwa Theme"));
} catch (IOException ioe) {
ioe.printStackTrace();
}
UIManager.getInstance().getLookAndFeel().setReverseSoftButtons(true);
mybutton1=new Button("Report A Problem");
mybutton2=new Button("Request Info");
Label lb1 = new Label("Welcome to Mairuwa");
lb1.setX(10);
lb1.setY(60);
lb1.getStyle().setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_MEDIUM));
Label lb2 = new Label("I Want to:");
lb2.setX(10);
lb2.setY(100);
lb2.getStyle().setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_MEDIUM));
Exit = new Command("Exit");
f.addComponent(lb1);
f.addComponent(lb2);
f.addCommand(Exit);
f.show();
}
}
ALso attached is the image of my emulator and also the image of what i am trying to achieve
my emulator image:
http://imageshack.us/photo/my-images...itproblem.png/
the image i am working towards:
http://imageshack.us/f/502/homeyfl.jpg/

Reply With Quote

