Guest User

Untitled

a guest
Jun 27th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. import java.awt.Component;
  2.  
  3. import javax.swing.*;
  4.  
  5.  
  6. public class movingBallTest {
  7. public movingBallTest(){
  8. movingBall mB = new movingBall();
  9. JFrame frame = new JFrame("Pallo");
  10. frame.setSize(400,600);
  11. frame.setResizable(true);
  12. frame.add(mB);
  13. frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  14. frame.setVisible(true);
  15. }
  16. public static String getW(){
  17. return (frame.getSize().width);
  18. }
  19. public static void main(String args[]){
  20. new movingBallTest();
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment