How to make full screen java applets?

前端 未结 4 1430
情话喂你
情话喂你 2021-02-20 04:59

I am designing a psychology experiment with java applets. I have to make my java applets full screen. What is the best way of doing this and how can I do this.

Since I

4条回答
  •  天命终不由人
    2021-02-20 05:46

    The obvious answer is don't use applets. Write an application that uses a JFrame or JWindow as its top-level container. It's not a huge amount of work to convert an applet into an application. Applets are designed to be embedded in something else, usually a web page.

    If you already have an applet and want to make it full screen, there's two quick and dirty hacks:

    1). If you know the screen resolution, just set the applet parameters to be that size in the HTML and then run the browser in full screen mode.

    2). Run the applet in appletviewer, rather than a web page, and maximise the appletviewer window.

提交回复
热议问题