Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package game;
- import java.awt.Color;
- import java.awt.Graphics;
- import javax.swing.JPanel;
- public class Pole extends JPanel{
- int slogn;
- public Pole(int slogn){
- this.slogn = slogn;
- }
- //
- public void paintComponent(Graphics gr){
- super.paintComponent(gr);
- // отображение граф информации
- // drawImage - для отображения информации на основе объекта типа Image
- gr.setColor(Color.red);
- gr.fillRect(10, 10, 200, 200);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement