0

The exit button is functional but I can't put it below the calculate button

https://code.sololearn.com/cp547GB0vSEb/?ref=app

12th Jan 2023, 2:05 PM
Aenul
Aenul - avatar
4 Réponses
+ 1
Here in SoloLearn, you can write programs just for console(I mean Java language)
12th Jan 2023, 3:32 PM
Smith Welder
Smith Welder - avatar
0
This is console.. Can't use GUI there
12th Jan 2023, 2:24 PM
Smith Welder
Smith Welder - avatar
0
Ouhh so how can i fix it☹️ should i copy paste the code here?
12th Jan 2023, 2:56 PM
Aenul
Aenul - avatar
0
I'm from phone, I can't check out your code.. button instance and btn looks different JButton btn = new JButton("CALCULATE");//creating instance of JButton btn.setBounds(120, 150, 150, 40);//x axis, y axis, width, height JButton button = new JButton("Click to Close!"); but didnt set bounds for button.. button.setBounds(...); --snip-- f.add(btn);//adding button in JFrame add btn but didnt add button.. f.add(button); You need look at documentation for swing library https://docs.oracle.com/javase/tutorial/uiswing/index.html
12th Jan 2023, 4:11 PM
Smith Welder
Smith Welder - avatar