public void paint(Graphics g) {
//Farbe vom rectangle
g.setColor(Color.white);
g.fillRect(0,0,breite,hoehe);
g.setColor(Color.black);
g.setFont(new Font("SansSerif",Font.BOLD,12));
//Überschrift
//g.drawString("Zeichenfläche",2,23);
int abstandLinks = 0;
//zeichne Balken zu den Zufallszahlen im array
for (int i = 0; i < array.length; i++) {
g.fillRect(abstandLinks, hoehe-array[i], 3, array[i]);
abstandLinks = abstandLinks +5;
}
int liObX = 160;
int liObY = 0;
int reUnX = 6;
int reUnY = hoehe;
//g.drawRect(liObX, liObY, reUnX, reUnY);
g.setColor(Color.black);
g.draw3DRect(0,0,breite-1,hoehe-1,true);
this.sortieren();
}
public void sortieren() {
bubble.bubbleSort(array);
}