AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Java Windows question..

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Language Programming
View previous topic :: View next topic  
Author Message
JTapio
Guest





PostPosted: Tue Oct 10, 2006 7:11 am    Post subject: Java Windows question.. Reply with quote



Hei!

I have an homepage www.eurojari.net containing an applet runnable..
if i add an image to my applet witch has an question of yes or no 'shall we
open a window' then,
how to i:
open fullscreen sized window ready to receive Graphics2D commands from my
applet run()..

thank you for helping a relative new person on java, c is more familiar to
me but net and java is quite a new..
very much thank you..

Yours : JariTapio
Homepage : www.EuroJari.net
EMail : JariTapio (AT) EuroJari (DOT) net
Back to top
Andrew Thompson
Guest





PostPosted: Tue Oct 10, 2006 7:11 am    Post subject: Re: Java Windows question.. Reply with quote



JTapio wrote:
....
Quote:
I have an homepage www.eurojari.net containing an applet runnable..

...hmmm. After visiting your homepage, and waiting several
minutes for the multitude of images and resources to load,
I saw a message about how this site was best viewed at
some 'screen resolution', and left.

I realise you were not asking us to critique the homepage, but
I will. Remove most of the images, or include tiny versions
(in both WxH and bytes) on the homepage, but link to large versions.

Move the applet from the homepage, onto a page where the user
is warned to expect to 'wait a few moment' for it to load, or better,
load it using webstart in a free floating window.

Designing for a particular screen size fell out of fashion last
millenium, make web sites for the users' screen size instead.

The bottom line of the web page (re., updates) has a typo.

Quote:
if i add an image to my applet witch has an question of yes or no 'shall we
open a window' then,
how to i:
open fullscreen sized window

<sscce>
import java.awt.*;
import java.applet.*;

public class AppletWindow extends Applet {
public void init() {
Frame f = Frame.getFrames()[0];
Window w = new Window(f);
w.setSize(
Toolkit.getDefaultToolkit().getScreenSize() );
w.setVisible(true);
}
}
</sscce>

Quote:
.... ready to receive Graphics2D commands from my
applet run()..

Is this an Applet or JApplet?

Andrew T.
Back to top
Andrew Thompson
Guest





PostPosted: Wed Oct 11, 2006 7:11 am    Post subject: Re: Java Windows question.. Reply with quote



JTapio wrote:
.....
Quote:
this is how far i have get..
please help to add canvas to frame..

Why do you want to create the canvas in the applet,
rather than simply make it in the frame?

(Note that if overriding 'paint' I will usually choose a
Container, since there is often no need for anything more.)

Quote:
public void init()
{
Canvas canvas = new myComponent ();
canvas.addComponentListener( new ComponentListener ()); // this line
needs help..

What is the purpose of listening to the canvas?

(I have done similar things, but until I understand exactly
what you are trying to do, what it looks like in the applet,
and what actions cause the frame/window to appear - I
cannot help much)

As an aside, the difference between a frame and a window
is that a window has no decorations - no 'title bar',
no 'close box'..

The code example I posted earlier in the thread, showed a
full-screen window popping from an applet (which is quite
bad if it has no button to close it & the way I did it, meant
the user could not get back to the web page with the applet!).

Andrew T.
Back to top
JTapio
Guest





PostPosted: Sat Oct 14, 2006 7:11 am    Post subject: Re: Java Windows question.. Reply with quote

Quote:

But having the applet itself, makes no sense to me.


You can feel safe and fine,with applet..

I need a code peek of putting an canvas to an frame..

JariTapio
www.eurojari.net
jaritapio (AT) eurojari (DOT) net
Back to top
Andrew Thompson
Guest





PostPosted: Sat Oct 14, 2006 7:11 am    Post subject: Re: Java Windows question.. Reply with quote

JTapio wrote:
Quote:

But having the applet itself, makes no sense to me.

You can feel safe and fine,with applet..

I feel 'safer and finer' with a sandboxed web start application*.
There is really no difference in security.

Compare the sandboxed/all-permissions end-user difference.
Sandboxed <http://www.physci.org/pc/jtest.jnlp>
all-permissions <http://www.physci.org/giffer/giffer.jnlp>
(both those were written and 'published' by me, though the
second hooks into an open source GIF animation library.)

* I use IE, and have not bothered to remove the 3810 MSVM.
If my settings get messed up and I cruise into a malicious
page with the MSVM as the default VM, the web master
has the potential to find the root location of the (MS) VM
installation on my PC, using a *sandboxed* applet.
That would not be possible with a sandboxed web start
application or applet (or any other VM).

Andrew T.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Language Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.