Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class drawPanel extends JPanel{
- public void paintComponent(Graphics g){
- g.setColor(backColor);
- g.fillRect(0, 0, getWidth(), getHeight());
- if (!glupost){
- ballX = (dP.getWidth() - ballDX) / 2;
- ballY = dP.getHeight() - ballDY;
- glupost = true;
- }
- }
- public void paintBorder(Graphics g){
- g.setColor(Color.red);
- System.out.println(Integer.toString(dP.getHeight()-100));
- System.out.println(Integer.toString(dP.getWidth())+ ":" + Integer.toString(dP.getHeight()));
- g.fillOval(ballX, ballY, ballDX, ballDY);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement