...

View Full Version : Topless JFrame



ld_pvl
07-16-2009, 02:17 AM
Hello,

How can I get rid of the header of a JFrame or a JInternalFrame?

For example, instead of having this kind of window:

=========
Title [-][x]
=========

Content

=========

I would like something like this

=========

Content

=========

I just need a container with borders which can be resizable by the user.

Just to elaborate the main problem that I'm looking for a solution now: I have a number of JInternalFrames inside a JDesktopPane which in turn is inside a JApplet. What I would like to do now is to get rid of the headers whilst the user could still drag them about, and resize them. It would not matter, for now, whether the desktop pane should be the parent or the applet should be the parent of the topless frames.

Some have advised me to use JWindows, however apparently they can't be child components of an applet. The .setUndecorated(true) method works only for a JFrame which again cannot be added into a JApplet. JInternalFrames do not possess .setUndecorated(boolean boo) method.

Any further ideas?

Thanks,
LD

DELOCH
07-16-2009, 06:19 PM
Perhaps you should look up JWindow.

however, the part where you resize it by dragging borders must be custom as far as i know...

ld_pvl
07-17-2009, 09:51 AM
I have been discussing on the same topic in another forum. Please visit this link for more information.

I apologize for not posting it earlier: http://forums.sun.com/thread.jspa?threadID=5397727&tstart=15

ld_pvl
07-19-2009, 11:45 PM
The problem has been solved and an example is given in Sun's forums. Please follow the link above if you're interested.

Regards,
LD



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum