2

I want to draw a custom version of a JFrame. Is is possible to extend to a JFrame and draw over it?

I've looked everywhere and can't seem to find a solution. Can someone help point me in the right direction? Thank you!

1
  • What exactly do you mean by "draw over it"? You can draw on its layers without extending it. Commented Sep 16, 2010 at 4:59

2 Answers 2

3

You can use setUndecorated(false) to disable the host platform's window decorations, as shown in this example.

Sign up to request clarification or add additional context in comments.

Comments

1

Check out this site from Sun (Oracle...):

http://download.oracle.com/javase/tutorial/uiswing/components/rootpane.html

This describes the layers of JFrame which you will have to override.

You can modify the drawing of the panes down below and make the background transparent. Then override the paint method on the Content Pane (or Glass Pane) and draw the frame as you wish.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.