samedi 5 novembre 2016

JPanel Checkbox

I wonder how i can hide the second drawOval when i check the checkbox:

public void paintComponent(Graphics g) {
         super.paintComponent(g); 
            g.drawOval(175, 185, 80, 45); 
            g.drawOval(170, 185, 80, 45); 

I'm a beginner in Java and i can't find on how to hide this.

So to be more specific

I have a checkbox in the design panel and when i click the checkbox the second drawOval should disappear.

And can this work with like 6 lines?




Aucun commentaire:

Enregistrer un commentaire