Skip to content

Instantly share code, notes, and snippets.

@emmettna
Created March 28, 2017 00:41
Show Gist options
  • Save emmettna/3812b535efde6d4a39802977e5c83a1f to your computer and use it in GitHub Desktop.
Save emmettna/3812b535efde6d4a39802977e5c83a1f to your computer and use it in GitHub Desktop.
Making Swing transparent background
frame.setUndecorated(true);
frame.getContentPane().setBackground(new Color(1.0f,1.0f,1.0f,0.0f));
frame.setBackground(new Color(1.0f,1.0f,1.0f,0.0f));
//additionally panel needs to be set opaque (panel.setOpaque(false))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment