You Are Here:

Community: Developer Discussion Boards

#1 Old Question developin gui in j2me-guys its very urgent - 2009-04-25, 18:04

Join Date: Apr 2009
Posts: 2
shrutis
Offline
Registered User
hv a j2me prg whch uses graphics
it draws an image n using displayables, v can scroll different options in menu
for each option, a separate class s designed bt d prob s
its not gettin connected 2 a class
here s a part of code in which a class s specified
try {
display = Display.getDisplay(this);

Displayable[] displayables = new Displayable[6];
displayables[0] = new testItem1(display);
displayables[1] = new testItem2(display);
displayables[2] = new testItem3(display);
displayables[3] = new testItem4(display);
displayables[4] = new testItem5(display);
displayables[5] = new testItem6(display, this);

int[][] highlighPositions = { {0,0}, {0,49}, {0,99},{0,147}, {0,200} };
highlightedMenu = new HighlightedMenu(Display.getDisplay(this), "/MenuImage1.png", "/highlightedItems1.png", 6, highlighPositions, displayables);

((testItem1)displayables[0]).parent = highlightedMenu;
((testItem2)displayables[1]).parent = highlightedMenu;
((testItem3)displayables[2]).parent = highlightedMenu;
((testItem4)displayables[3]).parent = highlightedMenu;
((testItem5)displayables[4]).parent = highlightedMenu;
//menu description
class testItem1 extends Form implements CommandListener {
Display myDisplay;
public Displayable parent;


public void testItem1(Display myDisplay)
{
this.myDisplay = myDisplay;
//System.out.println("Displaying form");
displayform();

setCommandListener(this);
}
public void commandAction(Command c, Displayable d) {
parent.close();
}
}

here its not callin displayform() fn
plz help me in dis
its very urgent
Reply With Quote

#2 Old Re: developin gui in j2me-guys its very urgent - 2009-04-25, 18:56

Join Date: Jun 2003
Posts: 4,325
Location: Cheshire, UK
grahamhughes's Avatar
grahamhughes
Offline
Forum Nokia Champion
Hi,

Will try to help you, but can you help me by writing words, and not the "text message" style? It would make it much easier to read what you're saying.

To me... this code looks like it should not compile. Displayable does not have a "close()" method (looking at parent.close() in commandAction()).

How do you know displayform() is not being called? What does it do? You call it in the constructor, which sounds like you're displaying each item in rapid succession, then presumably displaying the menu (you would only see the menu).

I'm guessing you want to select a menu option, then display one of your testItemn objects. Where is the code that does this?

Graham.
Reply With Quote

#3 Old Re: developin gui in j2me-guys its very urgent - 2009-04-26, 16:17

Join Date: Apr 2009
Posts: 2
shrutis
Offline
Registered User
Graham,

thanks a lot 4 ur attention
wht v hv done uptil nw s our project 'phone quiz' s displaying a form with questions n answer options in displayrms prg

v ddnt pay attention 2 gui

i hv a code whch displays menu n on clicking buttons it displays various forms
bt m not able 2 integrate dis into d original program 'displayrms'

please help me
Reply With Quote

#4 Old Re: developin gui in j2me-guys its very urgent - 2009-04-26, 17:03

Join Date: Jun 2003
Posts: 4,325
Location: Cheshire, UK
grahamhughes's Avatar
grahamhughes
Offline
Forum Nokia Champion
It is hard for me to help without knowing what code you have, or what happens when you run it.

Am I correct that the "HighlightedMenu" class is from this example?

What is "displayform()"??

Take some time to read the example code, and understand how it works.

Graham.
Reply With Quote

#5 Old Thumbs up Re: developin gui in j2me-guys its very urgent - 2009-04-27, 06:43

Join Date: Sep 2008
Posts: 1,195
Location: DELHI
Send a message via Yahoo to jitu_goldie
jitu_goldie's Avatar
jitu_goldie
Offline
Forum Nokia Champion
Quote:
Originally Posted by shrutis View Post
Graham,

thanks a lot 4 ur attention
wht v hv done uptil nw s our project 'phone quiz' s displaying a form with questions n answer options in displayrms prg

v ddnt pay attention 2 gui

i hv a code whch displays menu n on clicking buttons it displays various forms
bt m not able 2 integrate dis into d original program 'displayrms'

please help me
Do u want to diplay the other form on clicking any command on one form and so on?
Are u surely implement the CommandListener to ur displayable(form) like
form.setCommandListener(CommandListener);

Well if im wrong then please put ur code here with ur motive..


thanks,
jitu_goldie..

KEEP TRYING..
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Pacman in J2ME (urgent) kiranputhran Mobile Java Media (Graphics & Sounds) 0 2003-05-25 13:41
TinyLine SVG Minute Toolkit: Optimizing SVG for J2ME girow Mobile Java Media (Graphics & Sounds) 0 2003-05-05 19:44
TinyLine SVG Minute Toolkit for J2ME: version 1.4 released girow Mobile Java General 0 2003-05-05 17:25
how to get coordinate & file name of an Image item? J2me supports array? URGENT! lingtze1 Mobile Java General 1 2003-04-22 14:56
Urgent! new to J2ME hufs Mobile Java General 0 2003-03-02 14:15

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d134434X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ