Archived

This topic is now archived and is closed to further replies.

Dennis

[java] Frame

Recommended Posts

Dennis    122
Is it possible to create a frame (AWT) without a border? I mean a frame with no title bar, system menu, minimize and maximize buttons?

Share this post


Link to post
Share on other sites
Jim_Ross    122
no.


but you can make a java.awt.Window which is essentialy a frame without a frame (border, title, buttons) around it. You can use these for splash screens and whatnot.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
But a window needs an owner; either a frame, dialog, or another window.

Has anyone found a way to have a fullscreen java app with no title bar or border? Like in most full screen games (baldur''s gate ii etc).

Share this post


Link to post
Share on other sites
JasonB    122
You create a non visible frame which is passed to the constructor of the Window. Then resize the window to take up the whole screen.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
This works fine on windows (although sometimes the taskbar pokes through), but it doesn''t work properly under MacOS (pre X) as apples implementation of java does not seem to let you make a window that covers the entire screen. You end with space between the window edges and desktop edges.

Oh well another case of: write once, debug everywhere.

Share this post


Link to post
Share on other sites
JasonB    122
I know what you mean regarding Macs. I used to have a nightmare of a time (a couple of years ago), when I was doing some applet work, going from IE to Netscape - getting both of those working on a PC, and then going to a Mac where the whole thing would break again.

Share this post


Link to post
Share on other sites
GKW    200
quote:
Original post by Anonymous Poster

This works fine on windows (although sometimes the taskbar pokes through),


getFocus() usually gets rid of the taskbar.

The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran

Opere Citato

Share this post


Link to post
Share on other sites
thuned    122
yeah, i''m interested in this full screen java thing too. so a window w/ a non-visible parent would make it full screen. how about resolution? if the user has a diff res than 640x480, is there a way? or can a seperate program change it, launch the java app, then change back when done?

Share this post


Link to post
Share on other sites
GKW    200
Supposedly JRE 1.4 will let you change resolutions when you have a fullscreen window but I don''t know how to do it right now and in a month or so it won''t matter anyway. Hopefully.

The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran

Opere Citato

Share this post


Link to post
Share on other sites