Repintar componentes da classe Graphics

Então pessoal estou com uma dúvida que desde ontem que estou tentando modificar the componentes da class Graphics
e não estou conseguindo, eu fiz um desenho de uma árvore binária com 10 circulos e em cada círculo tem um valor de ordem
do vetor, até ai tudo bem, mas o que eu quero é que mostre a árvore com os valores randômicos do vetor e depois que eu
chamar o método para ordenar fazer com que os círculos recebam o valores ordenados, e é isso que não estou conseguindo
fazer, se alguém poder me ajudar eu agradeço muito!.

segue o código:



import java.util.Random;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

/**
 * @(#)HeapSort.java
 *
 *	Class of ordination of the kind <code>Heap Sort</code>, 
 *	where is how if is a tree that receive the values of a 
 *	vector and order they of form more simple that the anther.
 *
 * @author Wenderson Campos Pereira
 * @version 1.00 2009/8/27
 */

public class HeapSort extends  JFrame {
	
	private Tree tree;
	private int[] array = new int[ 10 ];
	private JButton display;
	
	
	/**
	 *	Default Constructor to implement the components GUI.
	 */	
	public HeapSort() {
		
		super( "My Heap Sort" );
		
		Random rand = new Random();
		

		for ( int i = 0; i < 10; i++ )
			this.array[ i ] = rand.nextInt( 20 );
		
		this.tree = new Tree( this.array );
		super.add( tree, BorderLayout.CENTER );
		
		this.display = new JButton( "Order" );
		super.add( this.display, BorderLayout.SOUTH );
		
		this.display.addActionListener(
			
			/**
			 *	Anonymous inner class to handler the event of the button.
			 */
			new ActionListener() {
				
				/**
				 *	Method that receive and handler the event of the button.
				 *
				 *	@param event receive the event of the button to handler.
				 */
				@Override
				public void actionPerformed( ActionEvent event ) {
					
					tree.configurePaintComponent();
					tree.repaint();
				}
			}
		);
		
		super.setSize( 300, 300 );
		super.setVisible( true );
		super.setLocationRelativeTo( null );
		super.setResizable( false );
	}
	
	
	/**
	 *	Class that configure the components of graphic interface
	 *	in the positions corrents for that it have the draw if a
	 *	<code>Tree</code>.
	 */
	class Tree extends JPanel {
		
		private int[] vector = new int[ 10 ];
		
		
		/**
		 *  Default Constructor, to repaint the components of the JPanel.
		 */
		public Tree() {
		}
		 
		
		/**
		 *	Class of one parameter, that receive a vector with the
		 *	values already inserteds, to attibute inside of the circles
		 *	that they are in the window.
		 *
		 *	@param array it write the yours values inside of ths circles.
		 */
		public Tree( int[] array ) {
			
			super();
			
			for ( int i = 0; i < 10; i++ ) 
				this.vector[ i ] = array[ i ];
		}
		
		/**
		 *	Configure the components of class <code>Graphics</code>.
		 *
		 *	@param g is the object of the class <code>Graphics</code>
		 *			 to configure the components in the JPanel.
		 */
		@Override
		public void paintComponent(Graphics g ) {
			
			super.paintComponent( g );
			
			// circle father A
			g.setColor( Color.WHITE );
			g.fillOval( 150, 40, 20, 20 );
			
			// draw a "String" inside of circle
			g.setColor( Color.BLACK );
			g.drawString( "" + this.vector[ 0 ], 155, 55 );
			
			// draw a line of the circle A even the B
			g.setColor( Color.BLUE );
			g.drawLine( 150, 55, 110, 100 );
			
			// left son B of A
			g.setColor( Color.WHITE );
			g.fillOval( 100, 90, 20, 20 );
			
			// draw a "String" inside of circle
			g.setColor( Color.BLACK );			
			g.drawString( "" + this.vector[ 1 ], 105, 105 );
			
			// right son C of A
			g.setColor( Color.WHITE );
			g.fillOval( 200, 90, 20, 20 );
			
			// draw a "String" inside of circle
			g.setColor( Color.BLACK );
			g.drawString( "" + this.vector[ 2 ], 205, 105 );
			
			// draw a line of the circle A even the C
			g.setColor( Color.BLUE );
			g.drawLine( 170, 55, 205, 90 );
			
			// left son D of B
			g.setColor( Color.WHITE );
			g.fillOval( 70, 140, 20, 20 );
			
			// draw a "String" inside of circle
			g.setColor( Color.BLACK );
			g.drawString( "" + this.vector[ 3 ], 75, 155 );
			
			// draw a line of the circle B even the D
			g.setColor( Color.BLUE );
			g.drawLine( 103, 108, 82, 140 );
			
			// right son E of B
			g.setColor( Color.WHITE );
			g.fillOval( 130, 140, 20, 20 );
			
			// draw a "String" inside of circle
			g.setColor( Color.BLACK );
			g.drawString( "" + this.vector[ 4 ], 135, 155 );
			
			// draw a line of the circle B even the E
			g.setColor( Color.BLUE );
			g.drawLine( 120, 108, 135, 140 );
			
			// left son F of C
			g.setColor( Color.WHITE );
			g.fillOval( 170, 140, 20, 20 );
			
			// draw a "String" inside of circle
			g.setColor( Color.BLACK );
			g.drawString( "" + this.vector[ 5 ], 175, 155 );
			
			// draw a line of the circle C even the F
			g.setColor( Color.BLUE );
			g.drawLine( 205, 108, 183, 140 );
			
			// ritht son G of C
			g.setColor( Color.WHITE );
			g.fillOval( 230, 140, 20, 20 );
			
			// draw a "String" inside of circle
			g.setColor( Color.BLACK );
			g.drawString( "" + this.vector[ 6 ], 235, 155 );
			
			// draw a line of the circle C even the G
			g.setColor( Color.BLUE );
			g.drawLine( 215, 110, 238, 140 );
			
			// right son H of D
			g.setColor( Color.WHITE );
			g.fillOval( 45, 190, 20, 20 );
			
			// draw a "String" inside of circle
			g.setColor( Color.BLACK );
			g.drawString( "" + this.vector[ 7 ], 50, 205 );
			
			// draw a line of the circle D even the H
			g.setColor( Color.BLUE );
			g.drawLine( 73, 158, 58, 190 );
			
			// right son I of D
			g.setColor( Color.WHITE );
			g.fillOval( 85, 190, 20, 20 );
			
			// draw a "String" inside of circle
			g.setColor( Color.BLACK );
			g.drawString( "" + this.vector[ 8 ], 90, 205 );
			
			// draw a line of the circle D even the I
			g.setColor( Color.BLUE );
			g.drawLine( 83, 160, 95, 188 );
			
			// right son J of E
			g.setColor( Color.WHITE );
			g.fillOval( 113, 190, 20, 20 );
			
			// draw a "String" inside of circle
			g.setColor( Color.BLACK );
			g.drawString( "" + this.vector[ 9 ], 115, 205 );
			
			// draw a line of the circle E even the J
			g.setColor( Color.BLUE );
			g.drawLine( 135, 159, 122, 190 );
			
		}
		
		
		/**
		 *	Method that it order the vector of the class, inside of this
		 *	method is create a object of the class <code>Graphics</code>
		 *	that will be passed for a method <code>paintComponent</code>
		 *  of this class, and too order the vector passed after.
		 *
		 *	@param array is the vector the to be inserted the yours values
		 *				 inside of the circles of the window.
		 */
		public void configurePaintComponent() {
			
			this.orderArray( array, 0, array.length - 1 );
			
			StringBuilder string = new StringBuilder();
			string.append( "[ " );
			
			for ( int i = 0; i < array.length; i++ ) {
				string.append( array[ i ] );
				
				if ( i + 1 < array.length )
					string.append( "," );
			}
			
			string.append( " ]" );
			
			JOptionPane.showMessageDialog( null, string );
				
		}
		
		
		/**
		 *	Method that return the vector of this class.
		 *
		 *	@return the vector of the class.
		 */
		public int[] getArray() {
			
			return this.vector;
		}
		
		
		
		/**
		 *	Private method to order the vector passed how parameter.
		 *	
		 *	@param array is the vector the to be ordered.
		 */
		private void orderArray( int[] array, int begin, int end ) {
			
			int i = begin;
			int j = end;
			int x = array[ ( ( i + j ) / 2 ) ];
			
			do {
				while ( array[ i ] < x ) i++;
				
				while ( array[ j ] > x ) j--;
				
				if ( i <= j ) {
					int aux = array[ i ];
					array[ i ] = array[ j ];
					array[ j ] = aux;
					i++;
					j--;
				}
				
			} while ( i <= j );
			
			if ( begin < j )
				orderArray( array, begin, j );
				
			if ( i < end )
				orderArray( array, i, end );
		}
	}
        
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
		HeapSort apply = new HeapSort();
		
		apply.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );		
    }
}


Fiz algumas alterações… veja se era da forma q gostaria…

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Random;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;

/**
 * @(#)HeapSort.java
 * 
 *                   Class of ordination of the kind <code>Heap Sort</code>,
 *                   where is how if is a tree that receive the values of a
 *                   vector and order they of form more simple that the anther.
 * 
 * @author Wenderson Campos Pereira
 * @author Weesley M. Ferreira
 * @version 1.00 2009/8/27
 */
public class HeapSort extends JFrame {
	private static final long serialVersionUID = 2608380056583566982L;

	private Tree tree;
	private int[] array = new int[10];
	private JButton display;
	
	/**
	 * Default Constructor to implement the components GUI.
	 */
	public HeapSort() {

		super("My Heap Sort");

		this.initialize();
	}

	/**
	 * Initialize a new number sequence
	 */
	private void initialize() {
		Random rand = new Random();

		for (int i = 0; i < 10; i++)
			this.array[i] = rand.nextInt(20);

		this.tree = new Tree(this.array);
		super.add(tree, BorderLayout.CENTER);
		
		this.display = new JButton("Order");
		super.add(this.display, BorderLayout.SOUTH);

		this.display.addActionListener(
				
		/**
		 * Anonymous inner class to handler the event of the button.
		 */
		new ActionListener() {

			/**
			 * Method that receive and handler the event of the button.
			 * 
			 * @param event
			 *            receive the event of the button to handler.
			 */
			@Override
			public void actionPerformed(ActionEvent event) {
				tree.configurePaintComponent();
				initialize();
			}
		});

		super.setSize(300, 300);
		super.setLocationRelativeTo(null);
		super.setVisible(true);
		super.setResizable(false);
	}
	
	/**
	 * Class that configure the components of graphic interface in the positions
	 * corrents for that it have the draw if a <code>Tree</code>.
	 */
	class Tree extends JPanel {
		private static final long serialVersionUID = 6846074374640085413L;

		private int[] vector = new int[10];

		/**
		 * Class of one parameter, that receive a vector with the values already
		 * inserteds, to attibute inside of the circles that they are in the
		 * window.
		 * 
		 * @param array
		 *            it write the yours values inside of ths circles.
		 */
		public Tree(int[] array) {

			super();

			for (int i = 0; i < 10; i++)
				this.vector[i] = array[i];
		}

		/**
		 * Configure the components of class <code>Graphics</code>.
		 * 
		 * @param g
		 *            is the object of the class <code>Graphics</code> to
		 *            configure the components in the JPanel.
		 */
		@Override
		public void paintComponent(Graphics g) {

			super.paintComponent(g);

			// circle father A
			g.setColor(Color.WHITE);
			g.fillOval(150, 40, 20, 20);

			// draw a "String" inside of circle
			g.setColor(Color.BLACK);
			g.drawString("" + this.vector[0], 155, 55);

			// draw a line of the circle A even the B
			g.setColor(Color.BLUE);
			g.drawLine(150, 55, 110, 100);

			// left son B of A
			g.setColor(Color.WHITE);
			g.fillOval(100, 90, 20, 20);

			// draw a "String" inside of circle
			g.setColor(Color.BLACK);
			g.drawString("" + this.vector[1], 105, 105);

			// right son C of A
			g.setColor(Color.WHITE);
			g.fillOval(200, 90, 20, 20);

			// draw a "String" inside of circle
			g.setColor(Color.BLACK);
			g.drawString("" + this.vector[2], 205, 105);

			// draw a line of the circle A even the C
			g.setColor(Color.BLUE);
			g.drawLine(170, 55, 205, 90);

			// left son D of B
			g.setColor(Color.WHITE);
			g.fillOval(70, 140, 20, 20);

			// draw a "String" inside of circle
			g.setColor(Color.BLACK);
			g.drawString("" + this.vector[3], 75, 155);

			// draw a line of the circle B even the D
			g.setColor(Color.BLUE);
			g.drawLine(103, 108, 82, 140);

			// right son E of B
			g.setColor(Color.WHITE);
			g.fillOval(130, 140, 20, 20);

			// draw a "String" inside of circle
			g.setColor(Color.BLACK);
			g.drawString("" + this.vector[4], 135, 155);

			// draw a line of the circle B even the E
			g.setColor(Color.BLUE);
			g.drawLine(120, 108, 135, 140);

			// left son F of C
			g.setColor(Color.WHITE);
			g.fillOval(170, 140, 20, 20);

			// draw a "String" inside of circle
			g.setColor(Color.BLACK);
			g.drawString("" + this.vector[5], 175, 155);

			// draw a line of the circle C even the F
			g.setColor(Color.BLUE);
			g.drawLine(205, 108, 183, 140);

			// ritht son G of C
			g.setColor(Color.WHITE);
			g.fillOval(230, 140, 20, 20);

			// draw a "String" inside of circle
			g.setColor(Color.BLACK);
			g.drawString("" + this.vector[6], 235, 155);

			// draw a line of the circle C even the G
			g.setColor(Color.BLUE);
			g.drawLine(215, 110, 238, 140);

			// right son H of D
			g.setColor(Color.WHITE);
			g.fillOval(45, 190, 20, 20);

			// draw a "String" inside of circle
			g.setColor(Color.BLACK);
			g.drawString("" + this.vector[7], 50, 205);

			// draw a line of the circle D even the H
			g.setColor(Color.BLUE);
			g.drawLine(73, 158, 58, 190);

			// right son I of D
			g.setColor(Color.WHITE);
			g.fillOval(85, 190, 20, 20);

			// draw a "String" inside of circle
			g.setColor(Color.BLACK);
			g.drawString("" + this.vector[8], 90, 205);

			// draw a line of the circle D even the I
			g.setColor(Color.BLUE);
			g.drawLine(83, 160, 95, 188);

			// right son J of E
			g.setColor(Color.WHITE);
			g.fillOval(113, 190, 20, 20);

			// draw a "String" inside of circle
			g.setColor(Color.BLACK);
			g.drawString("" + this.vector[9], 115, 205);

			// draw a line of the circle E even the J
			g.setColor(Color.BLUE);
			g.drawLine(135, 159, 122, 190);
		}

		/**
		 * Method that it order the vector of the class, inside of this method
		 * is create a object of the class <code>Graphics</code> that will be
		 * passed for a method <code>paintComponent</code> of this class, and
		 * too order the vector passed after.
		 * 
		 * @param array
		 *            is the vector the to be inserted the yours values inside
		 *            of the circles of the window.
		 */
		public void configurePaintComponent() {

			this.orderArray(array, 0, array.length - 1);

			StringBuilder string = new StringBuilder();
			string.append("[ ");

			for (int i = 0; i < array.length; i++) {
				string.append(array[i]);

				if (i + 1 < array.length)
					string.append(",");
			}

			string.append(" ]");

			JOptionPane.showMessageDialog(null, string);
		}

		/**
		 * Method that return the vector of this class.
		 * 
		 * @return the vector of the class.
		 */
		public int[] getArray() {

			return this.vector;
		}

		/**
		 * Private method to order the vector passed how parameter.
		 * 
		 * @param array
		 *            is the vector the to be ordered.
		 */
		private void orderArray(int[] array, int begin, int end) {

			int i = begin;
			int j = end;
			int x = array[((i + j) / 2)];

			do {
				while (array[i] < x)
					i++;

				while (array[j] > x)
					j--;

				if (i <= j) {
					int aux = array[i];
					array[i] = array[j];
					array[j] = aux;
					i++;
					j--;
				}

			} while (i <= j);

			if (begin < j)
				orderArray(array, begin, j);

			if (i < end)
				orderArray(array, i, end);
		}
	}

	/**
	 * @param args
	 *            the command line arguments
	 */
	public static void main(String[] args) {

		HeapSort apply = new HeapSort();

		apply.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}
}

Novamente… não havia entendido sua real necessidade… e agora acho q fiz o q queria… teste pra ver…

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;

/**
 * @(#)HeapSort.java
 * 
 *                   Class of ordination of the kind <code>Heap Sort</code>,
 *                   where is how if is a tree that receive the values of a
 *                   vector and order they of form more simple that the anther.
 * 
 * @author Wenderson Campos Pereira
 * @author Wesley M. Ferreira
 * @version 1.00 2009/8/27
 */
public class HeapSort extends JFrame {
	private static final long serialVersionUID = 2608380056583566982L;

	private Tree tree;
	private List<Integer> list = new ArrayList<Integer>();
	private JButton display;
	
	/**
	 * Default Constructor to implement the components GUI.
	 */
	public HeapSort() {

		super("My Heap Sort");

		final Random rand = new Random();

		for (int i = 0; i < 10; i++) {
			this.list.add(rand.nextInt(20));
		}	

		this.initialize();

		this.display.addActionListener(
				
		/**
		 * Anonymous inner class to handler the event of the button.
		 */
		new ActionListener() {

			/**
			 * Method that receive and handler the event of the button.
			 * 
			 * @param event
			 *            receive the event of the button to handler.
			 */
			@Override
			public void actionPerformed(ActionEvent event) {
				tree.configurePaintComponent();
				tree.repaint();
			}
		});

		super.setSize(300, 300);
		super.setLocationRelativeTo(null);
		super.setVisible(true);
		super.setResizable(false);
	}
	
	private void initialize() {
		this.tree = new Tree(this.list);
		super.add(tree, BorderLayout.CENTER);
		
		this.display = new JButton("Order");
		super.add(this.display, BorderLayout.SOUTH);
	}

	/**
	 * Class that configure the components of graphic interface in the positions
	 * corrents for that it have the draw if a <code>Tree</code>.
	 */
	class Tree extends JPanel {
		private static final long serialVersionUID = 6846074374640085413L;

		private List<Integer> vector = new ArrayList<Integer>();

		/**
		 * Class of one parameter, that receive a vector with the values already
		 * inserteds, to attibute inside of the circles that they are in the
		 * window.
		 * 
		 * @param array
		 *            it write the yours values inside of ths circles.
		 */
		public Tree(final List<Integer> array) {

			super();

			vector = array;
		}

		/**
		 * Configure the components of class <code>Graphics</code>.
		 * 
		 * @param g
		 *            is the object of the class <code>Graphics</code> to
		 *            configure the components in the JPanel.
		 */
		@Override
		public void paintComponent(Graphics g) {

			super.paintComponent(g);

			// circle father A
			g.setColor(Color.WHITE);
			g.fillOval(150, 40, 20, 20);

			// draw a "String" inside of circle
			g.setColor(Color.BLACK);
			g.drawString("" + this.vector.get(0), 155, 55);

			// draw a line of the circle A even the B
			g.setColor(Color.BLUE);
			g.drawLine(150, 55, 110, 100);

			// left son B of A
			g.setColor(Color.WHITE);
			g.fillOval(100, 90, 20, 20);

			// draw a "String" inside of circle
			g.setColor(Color.BLACK);
			g.drawString("" + this.vector.get(1), 105, 105);

			// right son C of A
			g.setColor(Color.WHITE);
			g.fillOval(200, 90, 20, 20);

			// draw a "String" inside of circle
			g.setColor(Color.BLACK);
			g.drawString("" + this.vector.get(2), 205, 105);

			// draw a line of the circle A even the C
			g.setColor(Color.BLUE);
			g.drawLine(170, 55, 205, 90);

			// left son D of B
			g.setColor(Color.WHITE);
			g.fillOval(70, 140, 20, 20);

			// draw a "String" inside of circle
			g.setColor(Color.BLACK);
			g.drawString("" + this.vector.get(3), 75, 155);

			// draw a line of the circle B even the D
			g.setColor(Color.BLUE);
			g.drawLine(103, 108, 82, 140);

			// right son E of B
			g.setColor(Color.WHITE);
			g.fillOval(130, 140, 20, 20);

			// draw a "String" inside of circle
			g.setColor(Color.BLACK);
			g.drawString("" + this.vector.get(4), 135, 155);

			// draw a line of the circle B even the E
			g.setColor(Color.BLUE);
			g.drawLine(120, 108, 135, 140);

			// left son F of C
			g.setColor(Color.WHITE);
			g.fillOval(170, 140, 20, 20);

			// draw a "String" inside of circle
			g.setColor(Color.BLACK);
			g.drawString("" + this.vector.get(5), 175, 155);

			// draw a line of the circle C even the F
			g.setColor(Color.BLUE);
			g.drawLine(205, 108, 183, 140);

			// ritht son G of C
			g.setColor(Color.WHITE);
			g.fillOval(230, 140, 20, 20);

			// draw a "String" inside of circle
			g.setColor(Color.BLACK);
			g.drawString("" + this.vector.get(6), 235, 155);

			// draw a line of the circle C even the G
			g.setColor(Color.BLUE);
			g.drawLine(215, 110, 238, 140);

			// right son H of D
			g.setColor(Color.WHITE);
			g.fillOval(45, 190, 20, 20);

			// draw a "String" inside of circle
			g.setColor(Color.BLACK);
			g.drawString("" + this.vector.get(7), 50, 205);

			// draw a line of the circle D even the H
			g.setColor(Color.BLUE);
			g.drawLine(73, 158, 58, 190);

			// right son I of D
			g.setColor(Color.WHITE);
			g.fillOval(85, 190, 20, 20);

			// draw a "String" inside of circle
			g.setColor(Color.BLACK);
			g.drawString("" + this.vector.get(8), 90, 205);

			// draw a line of the circle D even the I
			g.setColor(Color.BLUE);
			g.drawLine(83, 160, 95, 188);

			// right son J of E
			g.setColor(Color.WHITE);
			g.fillOval(113, 190, 20, 20);

			// draw a "String" inside of circle
			g.setColor(Color.BLACK);
			g.drawString("" + this.vector.get(9), 115, 205);

			// draw a line of the circle E even the J
			g.setColor(Color.BLUE);
			g.drawLine(135, 159, 122, 190);
		}

		/**
		 * Method that it order the vector of the class, inside of this method
		 * is create a object of the class <code>Graphics</code> that will be
		 * passed for a method <code>paintComponent</code> of this class, and
		 * too order the vector passed after.
		 * 
		 * @param list
		 *            is the vector the to be inserted the yours values inside
		 *            of the circles of the window.
		 */
		public void configurePaintComponent() {

			this.orderArray(list, 0, list.size() - 1);

			StringBuilder string = new StringBuilder();
			string.append("[ ");
			
			for (int i = 0; i < list.size(); i++) {
				string.append(list.get(i));
				
				if (i + 1 < list.size())
					string.append(",");
			}

			string.append(" ]");

			JOptionPane.showMessageDialog(null, string);
		}

		/**
		 * Method that return the vector of this class.
		 * 
		 * @return the vector of the class.
		 */
		public List<Integer> getArray() {

			return this.vector;
		}

		/**
		 * Private method to order the vector passed how parameter.
		 * 
		 * @param list
		 *            is the vector the to be ordered.
		 */
		private void orderArray(List<Integer> lista, int begin, int end) {

			int i = begin;
			int j = end;
			int x = lista.get(((i + j) / 2));

			do {
				while (lista.get(i) < x)
					i++;

				while (lista.get(j) > x)
					j--;

				if (i <= j) {
					int aux = lista.get(i);
					lista.set(i, lista.get(j));
					lista.set(j, aux);
					i++;
					j--;
				}

			} while (i <= j);
			
			if (begin < j)
				orderArray(lista, begin, j);

			if (i < end)
				orderArray(lista, i, end);
		}
	}

	/**
	 * @param args
	 *            the command line arguments
	 */
	public static void main(String[] args) {

		HeapSort apply = new HeapSort();

		apply.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}
}

Espero ter ajudado…

Nossa cara value mesmo, muito obrigado era isso mesmo que eu queria.

Agora gostaria de sabe o que você fez para que altera o repaint funcionace correto,
sei que você mudou a inicialização e utilizou List para armazenar os valores, mais gostaria de saber!

Thanks very much!

Na verdade não faço repaint…
Se olhar bem irá perceber q inicialmente crio o Tree com a lista de numeros gerados aleatoriamente…e sem ordenação.,…
e após pressionado o botão eu recrrio passando a lista ordenada…

Espero ter ajudado…

Qualquer coisa pergunta aí…

Flw