08-20-2008 12:54 AM
I was going through all the thread related to this question in this form but couldn't get any right solution. I want to set background color for the screen(Main Screen) and add fields on this. I got the solution for background coloring but fields didnt display after coloring.
Using Simulator : 7290
Solved! Go to Solution.
08-20-2008 01:07 AM
08-20-2008 01:17 AM
Thanks for quick reply. I am using this paint method but field didn't display.
public void paint(Graphics g)
g.fillRect(0, 0, this.getWidth(), this.getHeight());
08-20-2008 01:36 AM - edited 08-20-2008 01:37 AM
Okay, one more question. What are you seeing instead... a LIGHTSTEELBLUE colored screen with nothing else, or a black screen? I think that fillRect() is only affected by setColor(), so if you are seeing a black screen then its because the color defaults to black... and if you are using labels or something with black text, then they wouldn't show.
But if you are seeing a LIGHTSTEELBLUE colored screen... then I'm not sure =\
08-20-2008 03:40 AM
04-18-2009 02:56 AM
Reviving an old thread. I am facing an issue with the code given by Simon. I can get all the fields on the screen but the alignment settings of fields don't seem to work here.
I tried adding a VFM to the custom MainScreen class and then adding fields to it. The VFM's style has HCENTER and VCENTER values but the fields are not centrally aligned, they are all left aligned.