Currency Converter : how to make a window with text and buttons?

I have to create a currency converter, without having to use any GUI libraries, so I wanted to create a window where all the text and button would be. I wanted to use def setup and def draw functions but I’m not sure what code to write to make a window. Does anyone have any suggestions?

I’ve added line(mouseX,mouseY, pmouseX,pmouseY) under the def draw function but I need the window, so would I make a square for example?

Hi @bridgette ,

When you talk about the window are you talking about drawing an inner window? Because when using the setup() and draw() function, you already have the Processing window that you can use.


Thanks for your response! Yup, I mean a window where all my components for the currency converter will be. So, essentially a square in the Processing window. I tried using global square under the def draw function but I don’t even think that makes sense, and the program didn’t run.

Ok so if you are new to Processing, you should take a look at the tutorials on the website :

it will teach you how to display shapes and draw whatever you want with Processing.

Then you can start to think about how you would make that window with text, buttons… :wink:

Please note that this post is a duplicate of : Please Help: Currency Converter - #7 by bridgette

1 Like

I just had a separate question about the same assignment.

Ok I just renamed the topic then :wink:

Alright then, thank you.

1 Like