tp recursivite
This commit is contained in:
23
DEV3.2/TP02/05_Flocon/JFlocon.java
Normal file
23
DEV3.2/TP02/05_Flocon/JFlocon.java
Normal file
@@ -0,0 +1,23 @@
|
||||
import java.awt.*;
|
||||
import javax.swing.*;
|
||||
|
||||
public class JFlocon extends JComponent {
|
||||
|
||||
private int ordre;
|
||||
|
||||
public JFlocon(int ordre) {
|
||||
this.ordre = ordre;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void paintComponent(Graphics pinceau) {
|
||||
Graphics secondPinceau = pinceau.create();
|
||||
|
||||
if (this.isOpaque()) {
|
||||
this.setColor(this.getBackgroundColor());
|
||||
this.fillRect(0, 0, this.getWidth(), this.getHeight());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user