Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

repaint() problem

 
RavindraDSL Nandam
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Part A: initialize
GraphPane graphPane = graphDemo.graphPane;
graphPane.setXPoints(new int[1]);
graphPane.setYPoints(new int[1]);

Part B: repaint

GraphDemo.getContentPane().repaint();
controlPane.getGraphConfig().setXPoints(null);
controlPane.getGraphConfig().setYPoints(null);

Part C: should show new frame
GraphDemo graphFrame = new GraphDemo(controlPane,"DisplayGraph");
graphFrame.showFrame();
graphDemo.dispose();


As the "GraphDemo.getContentPane().repaint()" starts new thread.
Part C is not waiting for Part B to be completed. so it is not showing the initializing on Panel.

Solution i am looking for is:- aftet the repaint() method is complete then i wanted the Part c to be processed.
Is there anyway i can do this.... I heard that there are some methods like invokewait and invokelater() in the swing utilities. I dont know how to use them.



If anyone helps me, i would be grateful... as the deadlines are very tight.

Regards,
Ravindra
 
Bjørn Børresen
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
put it in a thread in invokeLater():


[ June 08, 2004: Message edited by: Bj�rn B�rresen ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic