Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package game.project;
- import javax.swing.JFrame;
- public class MainJFrameConfig {
- public static JFrame Jf = new JFrame();
- public static int UWidthTest = Jf.getContentPane().getWidth()-50;
- public static int UHeightTest = Jf.getContentPane().getHeight()-50;
- public static void JFrameSize(){
- int UWidth = Jf.getContentPane().getWidth();
- int UHeight = Jf.getContentPane().getHeight();
- System.out.println("| Width: " + UWidth + " | Height: " + UHeight + " | Time: " + MainGameLoop.TimeElapsed + " |");
- }
- public MainJFrameConfig(){
- Jf.setTitle(MainClassHandler.Title);
- Jf.setExtendedState(JFrame.MAXIMIZED_BOTH);
- Jf.setResizable(true);
- Jf.setSize(java.awt.Toolkit.getDefaultToolkit().getScreenSize().width-50,
- java.awt.Toolkit.getDefaultToolkit().getScreenSize().height-100);
- Jf.setLocationRelativeTo(null);
- Jf.setVisible(true);
- Jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement