Advertisement
Guest User

Main cucc

a guest
Nov 28th, 2014
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.72 KB | None | 0 0
  1. import java.awt.Color;
  2. import java.awt.Dimension;
  3. import java.awt.Toolkit;
  4.  
  5. import javax.swing.*;
  6.  
  7.  
  8. public class Application {
  9.  
  10.     public static void main(String[] arg){
  11.         JFrame frame = new JFrame();
  12.  
  13.         Festo zold = new Festo(Color.GREEN);
  14.        
  15.         //Frame beállítása
  16.         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  17.         frame.setSize(360,80);
  18.         frame.setResizable(false);
  19.         frame.setLocationByPlatform(true);
  20.         frame.setTitle("Barnanak healthbar");      
  21.         Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
  22.         frame.setLocation(dim.width/2-frame.getSize().width/2, dim.height/2-frame.getSize().height/2);
  23.         frame.setVisible(true);
  24.        
  25.  
  26.         frame.add(zold);
  27.  
  28.         zold.setlength(100);
  29.        
  30.        
  31.     }
  32.    
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement