Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / September 2005

Tip: Looking for answers? Try searching our database.

Macosx fullscreen

Thread view: 
Flatman - 11 Sep 2005 19:27 GMT
Hi,

I'm searching a way to make a Applet running in full fullscreen on
MacosX. Including no menubar in top.

any idea ?

Signature

Erik

* Life is wonderful with Emacs and Perl *

Andrew Thompson - 11 Sep 2005 23:33 GMT
> I'm searching a way to make a Applet running in full fullscreen on
> MacosX. Including no menubar in top.

That would depend on the browser.  

Why an applet?  What does the applet do?

Signature

Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
"Don't just take me for tryin' to be heavy.  Understand, it's time to get
ready.."
Stevie Ray Vaughan and Double Trouble  'Couldn't Stand The Weather'

Flatman - 12 Sep 2005 07:06 GMT
| > I'm searching a way to make a Applet running in full fullscreen on
| > MacosX. Including no menubar in top.
|
| That would depend on the browser.  
|
| Why an applet?  What does the applet do?

The applet is based on the PApplet of processing.org . It allows
animations and stuff like that ...
I once heard about making an application fullscreen and then incorporate
the applet in it . Would that be possible ?

Signature

Erik

Andrew Thompson - 12 Sep 2005 08:25 GMT
>|> I'm searching a way to make a Applet running in full fullscreen on
>|> MacosX. Including no menubar in top.
..
>| Why an applet?  What does the applet do?
>
> The applet is based

So, you control the code? [1]

>..on the PApplet of processing.org .

There are some nice applets there, well suited
to Java based screensavers.
<https://screensavers.dev.java.net/>

>..It allows
> animations and stuff like that ...
> I once heard about making an application fullscreen and then incorporate
> the applet in it . Would that be possible ?

[1] Sure, but if you have the code, it is a lot easier
to add a main() to the applet so it can run as an
application as well.  Then you can have the best of
all worlds.

Signature

Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
"Takes her over the breakers, to where the water is calm.."
Paul Kelly 'Deeper Water'

Flatman - 12 Sep 2005 08:51 GMT
| >|> I'm searching a way to make a Applet running in full fullscreen on
| >|> MacosX. Including no menubar in top.
[quoted text clipped - 4 lines]
|
| So, you control the code? [1]

The code of processing.org is opensource and freely downloadable. It
produces an applet and I would not like to modify the processing.org
code .
That's why I produce an Applet too ...

| >..on the PApplet of processing.org .
|
| There are some nice applets there, well suited
| to Java based screensavers.
| <https://screensavers.dev.java.net/>

I've checked , but the framewwork is not supported on Macosx ...

| >..It allows
| > animations and stuff like that ...
[quoted text clipped - 5 lines]
| application as well.  Then you can have the best of
| all worlds.

Adding a 'main' to the applet is OK, but what should I put in it to
produce fullscreen output ?

Signature

Erik

Mark Haase - 12 Sep 2005 12:51 GMT
> Adding a 'main' to the applet is OK, but what should I put in it to
> produce fullscreen output ?

Convert an applet to an application:

http://www.rgagnon.com/javadetails/java-0305.html

Use JNI to bridge Java to Cocoa:

http://java.sun.com/docs/books/tutorial/native1.1/

Use Cocoa to set up a full screen:

http://developer.apple.com/technotes/tn2002/tn2062.html

PS. I can't promsise this all works...and it sounds pretty complicated
to me. I'm just suggesting this as one avenue to investigate.

When you're done, you'll have a Java app that only runs on OS X,
however, unless you write full-screen windowing libraries for each other
system you want to run it on.

Why not just use Cocoa to begin with? The entire Cocoa API is exposed in
Java anyway, you would just have to use Cocoa drawing commands instead
of AWT/Swing. It would be pretty simple with Xcode 2: you can link
straight to the OS X screen saver framework.

|\/|  /|  |2  |<
mehaase(at)gmail(dot)com
Flatman - 15 Sep 2005 08:05 GMT
Thanks to all of you for hints...
I got it working nicely now .

Signature

Erik

Roedy Green - 21 Sep 2005 04:22 GMT
>Thanks to all of you for hints...
>I got it working nicely now .

Did you find a mac-specific solution or something cross-platform?
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Flatman - 21 Sep 2005 07:05 GMT
| >Thanks to all of you for hints...
| >I got it working nicely now .
|
| Did you find a mac-specific solution or something cross-platform?

I did not try it, but it should work cross-platform ... However other
platforms don't have the menubar on top of screen, so that should not be
a problem at all

Signature

Erik

Mark Haase - 12 Sep 2005 04:42 GMT
> I'm searching a way to make a Applet running in full fullscreen on
> MacosX. Including no menubar in top.

Probably no way. An application could do it, maybe, with JNI calls to a
cocoa library that you write to set up the full screen window.

|\/|  /|  |2  |<
mehaase(at)gmail(dot)com
Dave Butler - 14 Sep 2005 04:33 GMT
>I'm searching a way to make a Applet running in full fullscreen on
>MacosX. Including no menubar in top.

>any idea ?

Caveat: I haven't done applets in a long while.

In theory, it might be possible for your applet (in Java 1.4) to:
 a) get the local java.awt.GraphicsEnvironment
 b) from that, get the java.awt.GraphicsDevice[]
 c) find the appropriate one (should be a TYPE_RASTER_SCREEN)
 d) check that it supports full screen (call isFullScreenSupported() )
 e) create a Window to draw on
 f) pass that to setFullScreenWindow()
 g) do your layout on the Window

(Substitute Window subclass as appropriate for your purposes.)

I rather suspect that your greatest difficulty will be getting all that
past the security manager.  (Are Applets even allowed to spawn new windows
or frames?  I told you it's been a long while since I touched applets.)

Anyhow, the code to get a Java _application_ to go fullscreen on my iBook
is only about seven lines of Q&D code.  Doing it right shouldn't take more
than 10 to 15 lines.

HTH

Signature

--DcB



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.