bonjour, je suis entrain de convertir un script du java vers python,
je ne sais pas comment transcrire ces quelques instructions:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 setTitle("rec"); getContentPane().setLayout(null); setBackground(Color.lightGray); setBounds(100,50,270,240); date=new Date(); rand=new Random(date.getTime()); setVisible(true);
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 File loader=new File("image.bmp"); FileInputStream in=new FileInputStream(loader); int bytes_read=0; size=(int)loader.length(); in.read(_data); in.close();Merci pour votre aide!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 box=this.getGraphics(); box.setColor(Color.blue); box.drawRect(x+10,y+y_pos,Side,Side); box.drawRect(x+9,y+y_pos-1,Side+2,Side+2);
Partager