DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Customize JFrame

02.12.2011
| 2730 views |
  • submit to reddit
        Remove cursor (f=Frame):

f.setCursor(java.awt.Toolkit.getDefaultToolkit().createCustomCursor(new java.awt.image.BufferedImage(1,1,java.awt.image.BufferedImage.TYPE_4BYTE_ABGR),new java.awt.Point  (0,0),"NOCURSOR"));
  }

Make fullscreen window:
f.setExtendedState(f.MAXIMIZED_BOTH);

Remove window decoration:
f.setUndecorated(true);