I want to show some parent-child relationship by drawing rectangles.first,i'll draw all the parent rectangles,on-click of parent rectangle,child should dispaly.(for all clicked rectangle).I implemented,first by drawing the all the Parent rectanlges.if any Parent rectangle was clicked,I 'll check whether it has child,if it has,I have to call the (drawRect(Graphics g) and repaint everything)�But here,the problem is the screen is not repainting properly..can anyone help me� [ July 21, 2008: Message edited by: priya g ]
This is a lot of code to go through. You can make it easier for people to help you if you describe in detail what the code is supposed to do, and what it is actually doing. Also, "the screen is not repainting properly" is not a very useful problem description - people here are not going to run the code, so they can't see what's happening.
I'm want to display parent child relationship for some(comes from xml) first,i'll read and draw only the parent and draw it as rectangle(co-ordinates were decided by me) then,if i click on the rectangle(which represents the parent)child should display(as in the jtree) so,when i click on the parent rectangle,below it child rectangle should display and all other rectangles below it should be adjust so that it 'll not overlay.so for the first time(while the applet loaded)i'll get count of parents and draw rectangles.when any of this rectangle was clicked,its status will be maintained(true for clicked a particular rectangle false for not clicked).in an array and the whole thinghave to be re drawn while redrawing,the status 'll be checked if true,child rectangle 'll be drawn only for the rectangle whose status is true.but,for me for the first click the,its working fine.But for the second click on someother rectangle,its drawing twice and for the third click on some other,nothing is getting changed....I don't know where i went wrong...can you please help me..