Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Import Java.awt.*
- Public class Figury extends Frame {
- Figury() {//konstruktor
- setSize(500,600);
- SetVisible(true);
- }
- public void paint (Graphics cos) {
- cos.drawLine( 5, 10, 50, 100);
- cos.drawRect(10, 10, 20, 30); //prostokąt
- cos.fillRoundRect(8, 90, 10, 10); //wypełniony I zaokrąglony prostokąt
- }
- Public static void main (String args[]) {
- new Figury();
- }
- }
Add Comment
Please, Sign In to add comment