| Reply | « Previous Thread | Next Thread » |
|
Hi,
I am trying to use the CustomItem and my starting point is the code from the example that I got from here: http://developers.sun.com/techtopics...ems/index.html This code does not seem to work for me. It throws an IllegalAccessError when line 6 is executed. Code:
1: public void paint( Graphics g, int w, int h )
2: {
3: // clear all with background color
4: int colour = 0;
5: colour = DISPLAY.getColor(DISPLAY.COLOR_BACKGROUND );
6: g.setColor(colour);
7: g.fillRect( 0, 0, w, h );
8: // now use foreground color for drawing
9: colour = DISPLAY.getColor(DISPLAY.COLOR_FOREGROUND);
10: g.setColor(colour);
}
Code:
Ca the: alg.Error: IlAcessro ava.laError: IllegalAccessErrorCallback thre: jav.lang.Error: legaAceError Callback threI At first I thought that it may be a bug in the S60 3rd Edtion SDK that I was using so I downloaded the latest to eliminate that possibility - that made no difference. I have read the doc on DISPLAY and the code looks correct to me. Do you see anything that I am doing wrong? Thanks for any help that you can provide, Frank |
|
Join Date: Aug 2006
Posts: 486
Location: Rawalpindi, Pakistan
nicenouman
Offline
Regular Contributor
|
|
i might be wrong but i think its worth a shot.
in your code when u setcolor the first time. then wait for a second or two. there is a possibility that the first setcolor is still not complete and ur calling another setcolor which gives an illegel access. it might not work but what do we got to lose. Regards Nouman |
| nicenouman |
| View Public Profile |
| Find all posts by nicenouman |
|
Thanks nicenouman. Good idea.
I tried waiting for 5 seconds but the results are the same. |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Problem with TextField and CustomItem on the same Form | manmli | Mobile Java General | 8 | 2008-12-23 14:10 |
| CustomItem traversal on MIDP Form - bug? | mbetan | Mobile Java General | 8 | 2008-12-02 18:43 |
| Video player on CustomItem | dyuen000 | Mobile Java Media (Graphics & Sounds) | 3 | 2007-07-02 19:32 |
| CustomItem traverse problem on S60 | lady_biju | Mobile Java General | 2 | 2006-11-17 13:43 |
| Force CustomItem to get focus and display completely | sirsio | Mobile Java General | 0 | 2006-03-20 08:50 |