problème de contrôle sur un composant redessiné
Bonjour, j'ai petit problème de contrôle sur une scrollbar que je redessine "en dur" :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
@Override
public void paint(Graphics g) {
super.paint(g);
if (horizontalScrollBar.getVisibleAmount() != horizontalScrollBar
.getMaximum()) {
int x = this.getX() + 145;
int y = this.getY() + this.getSize().height - 19;
int width = this.getWidth() - 150;
int height = 15;
g.translate(x, y);
this.horizontalScrollBar.setBounds(x, y, width, height);
horizontalScrollBar.paint(g);
}
} |
Pour l'affichage, ça marche, cependant je n'ai plus de contrôle dessus...
Comment y remedier?