| Reply | « Previous Thread | Next Thread » |
|
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 |
|
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. |
| grahamhughes |
| View Public Profile |
| Find all posts by grahamhughes |
|
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 |
|
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. |
| grahamhughes |
| View Public Profile |
| Find all posts by grahamhughes |
|
Quote:
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.. |
| jitu_goldie |
| View Public Profile |
| Find all posts by jitu_goldie |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| 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 |