Timer timer = new Timer(20,new ActionListener() {
public void actionPerformed(ActionEvent e) {
imagePanel.repaint();
}
});
timer.start();
strokeControl.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
bar1.putClientProperty("useStrokeControl", new Boolean(strokeControl.isSelected()));
bar2.putClientProperty("useStrokeControl", new Boolean(strokeControl.isSelected()));