Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Toolkit tk = Toolkit.getDefaultToolkit();
- Dimension d = tk.getScreenSize();
- System.out.println("Your screen has width: " + d.width + " and height: " + d.height);
- int tempWidth = d.width;
- int tempHeight = d.height;
- OperatingSystemMXBean osMXBean = (OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean();
- long memory = osMXBean.getTotalPhysicalMemorySize();
- if(d.width > 1280 && memory < 1000000000)
- {
- tempWidth = 1280;
- tempHeight = d.height * 1280 / d.width;
- }
- this.view = new View(tempWidth, tempHeight, true, "Lilu & Lila");
Add Comment
Please, Sign In to add comment