some problem in j4me

6 views
Skip to first unread message

pradeep murjwani

unread,
Nov 24, 2010, 12:13:46 AM11/24/10
to j4...@googlegroups.com

Hello Sir, 

               My problem is that when i m adding 5 images in the screen(using method name as append(component)) then i scroll the page by click on down button on mobile(i.e 7210), its scroll very slow.i tried to solve the problem many times but i can't find any solution.
               I request you to please give me the solution

                each image has 5KB  of size
                e.g-->
                            try{
car1 = Image.createImage("/car.png");
car2 = Image.createImage("/50px-IconMuscleCar.png");
car3 = Image.createImage("/Car1Small.png");
car4 = Image.createImage("/cars-car_003.png");
car5 = Image.createImage("/dio-icon-car.png");
}
catch(Exception e){
}

                        
                      SecondScreenComponent scrcar1 = new SecondScreenComponent
("White Car for sale. Cost: 3,00000/-", car1,this);
append(scrcar1);
this.append(new Whitespace(5));

SecondScreenComponent scrcar2 = new SecondScreenComponent
("Red Car for sale. Cost: 2,30000/-", car2,this);
append(scrcar2);
this.append(new Whitespace(5));
                        SecondScreenComponent scrcar3 = new SecondScreenComponent
("Blue Car for sale. Cost: 3,00000/-", car3,this);
append(scrcar3);
this.append(new Whitespace(5));

SecondScreenComponent scrcar4 = new SecondScreenComponent
("Red sports Car for sale. Cost: 5,00000/-", car4,this);
append(scrcar4);
this.append(new Whitespace(5));

SecondScreenComponent scrcar5 = new SecondScreenComponent
("Wintage Car for sale. Cost: 4,00000/-", car5,this);
append(scrcar5);
this.append(new Whitespace(5));


thanks..

--
Regards
Pradeep.M.Murjwani
9322022344

JB

unread,
Nov 25, 2010, 3:12:15 AM11/25/10
to J4ME
Hi, try this

try {
PictureX pic = new PictureX();

pic.setHorizontalAlignment( Graphics.HCENTER );

pic.setImage("/car1.png");

Label lb = new Label();

lb.setLabel("White Car for sale. Cost: 3,00000");

lb.setHorizontalAlignment(Graphics.HCENTER);

//ContainerComponentX cc = new ContainerComponentX
(ContainerComponentX.LAYOUT_HORIZONTAL);

//cc.paintBg(true);

//cc.setKnowHowToPaintBg(false);

cc.append(pic);

cc.append(lb);

//onSelection this menu
will go to NationalLotteryMenu Screen.
//NationalLotteryMenuView lotteryView = new
NationalLotteryMenuView( midlet );
menu.appendMenuOption(cc, cc);
//----------------------------------------------------------------------------------------

PictureX pic2 = new PictureX();
pic4.setHorizontalAlignment( Graphics.HCENTER );

pic4.setImage("/car2.png");

Label lb4 = new Label();

lb4.setLabel("Red Car for sale. Cost: 2,30000");

lb4.setHorizontalAlignment(Graphics.HCENTER);

//ContainerComponentX cc4 = new ContainerComponentX
(ContainerComponentX.LAYOUT_HORIZONTAL);

//cc4.paintBg(true);

//cc.setKnowHowToPaintBg(false);

cc4.append(pic4);

cc4.append(lb4);

cc4.setHorizontalAlignment(Graphics.LEFT);

//onSelection this menu will go to HealthMenu Screen.
//CarTravelMenuView carTravelMenuView = new
CarTravelMenuView(midlet);
menu.appendMenuOption(cc4, cc4);
//----------------------------------------------------------------------------------------


On Nov 23, 5:13 pm, pradeep murjwani <pradeep.murjwani...@gmail.com>
wrote:
> Hello Sir,
>
>                My problem is that when i m adding 5 images in the
> screen(using method name as append(component)) then i scroll the page by
> click on down button on mobile(i.e 7210), its *scroll very slow.*i tried to
> solve the problem many times but i can't find any solution.
>  *               *I request you to please give me the solution

pradeep murjwani

unread,
Nov 29, 2010, 4:08:03 AM11/29/10
to J4ME
i wrote a component which extends the menuOption i.e
SecondScreenComponent .It accept the 3 parameters,
1)label
2)image
3)current class object

this component will first print the image after the text
the screen will look like this
-----------------------------
Welcome User
-----------------------------
Image 1 | Text

Image 2 | Text

Image 3 | Text

Image 4 | Text

Image 5 | Text
-----------------------------
select Back
----------------------------

now the problem is that when i am adding the 5 images in screen its
"scroll very slow" (in nokia 7210 mobile device)
i tried to solve the problem many times but i can't find any solution.
I request to all please provide me the solution


the same problem is also exist when i adding the text around 150 as
follows----
this.appendMenuOption("label 1",this);
this.appendMenuOption("label 2",this);
this.appendMenuOption("label 3",this);
'''
'''
'''
this.appendMenuOption("label 150",this);


thanks.....................................................................................................
Reply all
Reply to author
Forward
0 new messages