Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7436671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:16:37+00:00 2026-05-29T10:16:37+00:00

http://processing.org/learning/eclipse/ according step 5, I used PApplet.main( new String[] { –present, MyGame }); in

  • 0

http://processing.org/learning/eclipse/ according step 5, I used PApplet.main( new String[] { "--present", "MyGame" }); in my Main method. The game is in full screen mode, how do I switch to window mode?
(I don’t want to just run it as Java Applet…)

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:16:38+00:00Added an answer on May 29, 2026 at 10:16 am

    If you don’t want to use window mode, simply don’t pass the argument:

    PApplet.main(new String[] {"MyGame"});
    

    If you want to switch from present mode to window mode, you’ll need to handle things manually AFAIK. PApplet extends java’s Applet class and uses a Frame to add contents into.
    Here’s a quick hack:

    import processing.core.PApplet;
    
    
    public class MyGame extends PApplet {
    
        public void setup(){
            size(400,400);
            background(255);
            smooth();
            stroke(0,32);
        }
        public void draw(){
            fill(255,1);
            rect(0,0,width,height);
            translate(width/2,height/2);
            rotate(frameCount * .1f);
            line(0,0,width/3,0);
        }
        public void keyPressed(){
            if(key == 'f') exitFullscreen();
        }
    
        private void exitFullscreen() {
            frame.setBounds(0,0,width,height);
            setBounds((screenWidth - width) / 2,(screenHeight - height) / 2,width, height);
            frame.setLocation((screenWidth - width) / 2,(screenHeight - height) / 2);
            setLocation((screenWidth - width) / 2,(screenHeight - height) / 2);
        }
        public static void main(String args[]) {
            PApplet.main(new String[] { "--present", "MyGame" });
        }
    }
    

    Feel free tinker with the exitFullscreen() method to get the desired setup.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can i apply lens effect to my UIImage like it shown here http://processing.org/learning/topics/lens.html
Look at the last updated release, Python 2.5?? http://pypi.python.org/pypi/processing
I really like the work that's done with processing ( http://processing.org ) but I'm
http://processingjs.org/content/download/processing-js-1.2.1/processing-1.2.1.min.js http://processingjs.org/content/download/processing-js-1.2.1/processing-1.2.1-api.min.js Just observed that 2 javascript files are shipped in the distribution, what
http://en.wikipedia.org/wiki/ICalendar I'm working to implement an export feature for events. The link above lists
http://en.wikipedia.org/wiki/Diamond_problem I know what it means, but what steps can I take to avoid
I am reading here: http://groovy.codehaus.org/modules/http-builder/doc/get.html I seem to be able to get i) XMLSlurper
I got the following error: > org.apache.jasper.JasperException: An > exception occurred processing JSP page
I'm trying to use the Fabric 0.1.1 deploy tool ( http://docs.fabfile.org/ ) on Windows
So, here is the discussion I have just read: http://www.mail-archive.com/delphi@delphi.org.nz/msg02315.html BeginUpdate and EndUpdate is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.