Hi guys,

hope you can help me.

I set up a view using the VLDockingViewDescriptor. The view should be initialized upon a certain event. However, the view will only be updated after I resized it.

This is the relevant code:

Code:
    protected JComponent createControl() {    	

        panel = getComponentFactory().createPanel(new BorderLayout());
		
        return panel;
    }


   private void init() {

    	ForceDirectedGraph fdg = new ForceDirectedGraph(goGame.getConfiguration().getAdjacencies(), 100, 0.1, 10);
    	fdg.initialize();    	
    	map = new ForceDirectedGraphLayouter(0.0001, 1.0, 200, 10, new Timer(), fdg);    	
    	map.run();    	
    	edges = map.getGraph().getEdges();
	nodes = map.getGraph().getNodes();

		
	graphPanel = getGraphPanel();
		
	scrollPane = new JScrollPane(graphPanel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
	this.getControl().add(scrollPane);
		
		
	System.out.println("I wanna repaint now!");
	
	//doesn't work:	
	this.getControl().repaint();
		
    }

	private JPanel getGraphPanel() {
		System.out.println("visualizationView.getGraph() called.");
		
		graphPanel = new JPanel() {

			private static final long	serialVersionUID	= 1L;

			protected void paintChildren( Graphics g )
			{
			System.out.println("visualizationView.getGraphPanel().paintChildren() called.");
			//draw the stuff...
			/* [...] */

			}
		};
		
		return graphPanel;
	}

Any help is highly appreciated and will be mentioned in my thesis.

Kind regards,
Mario